Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r76857 - in trunk/libs/geometry/test: algorithms multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2012-02-03 14:15:03


Author: barendgehrels
Date: 2012-02-03 14:15:02 EST (Fri, 03 Feb 2012)
New Revision: 76857
URL: http://svn.boost.org/trac/boost/changeset/76857

Log:
Updated tests to latest fixes, within/large integers, correct now with int, removed wkt/iomanip by default
Text files modified:
   trunk/libs/geometry/test/algorithms/correct.cpp | 2 +-
   trunk/libs/geometry/test/algorithms/within.cpp | 24 ++++++++++++++++++++++++
   trunk/libs/geometry/test/multi/algorithms/multi_difference.cpp | 2 +-
   trunk/libs/geometry/test/multi/algorithms/multi_union.cpp | 2 +-
   4 files changed, 27 insertions(+), 3 deletions(-)

Modified: trunk/libs/geometry/test/algorithms/correct.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/correct.cpp (original)
+++ trunk/libs/geometry/test/algorithms/correct.cpp 2012-02-03 14:15:02 EST (Fri, 03 Feb 2012)
@@ -170,7 +170,7 @@
     //test_all<float[2]>(); not yet because cannot be copied, for polygon
     //test_all<double[2]>();
 
- //test_all<point_xy<int> >();
+ test_all<bg::model::d2::point_xy<int> >();
     test_all<bg::model::d2::point_xy<float> >();
     test_all<bg::model::d2::point_xy<double> >();
 

Modified: trunk/libs/geometry/test/algorithms/within.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/within.cpp (original)
+++ trunk/libs/geometry/test/algorithms/within.cpp 2012-02-03 14:15:02 EST (Fri, 03 Feb 2012)
@@ -218,8 +218,32 @@
 }
 
 
+void test_large_integers()
+{
+ typedef bg::model::point<int, 2, bg::cs::cartesian> int_point_type;
+ typedef bg::model::point<double, 2, bg::cs::cartesian> double_point_type;
+
+ std::string const polygon_li = "POLYGON((1872000 528000,1872000 192000,1536119 192000,1536000 528000,1200000 528000,1200000 863880,1536000 863880,1872000 863880,1872000 528000))";
+ bg::model::polygon<int_point_type> int_poly;
+ bg::model::polygon<double_point_type> double_poly;
+ bg::read_wkt(polygon_li, int_poly);
+ bg::read_wkt(polygon_li, double_poly);
+
+ std::string const point_li = "POINT(1592000 583950)";
+ int_point_type int_point;
+ double_point_type double_point;
+ bg::read_wkt(point_li, int_point);
+ bg::read_wkt(point_li, double_point);
+
+ bool wi = bg::within(int_point, int_poly);
+ bool wd = bg::within(double_point, double_poly);
+
+}
+
 int test_main( int , char* [] )
 {
+ test_large_integers();
+
     test_all<bg::model::d2::point_xy<int> >();
     test_all<bg::model::d2::point_xy<double> >();
 

Modified: trunk/libs/geometry/test/multi/algorithms/multi_difference.cpp
==============================================================================
--- trunk/libs/geometry/test/multi/algorithms/multi_difference.cpp (original)
+++ trunk/libs/geometry/test/multi/algorithms/multi_difference.cpp 2012-02-03 14:15:02 EST (Fri, 03 Feb 2012)
@@ -175,7 +175,7 @@
     test_all<bg::model::d2::point_xy<double> >();
 
 #ifdef HAVE_TTMATH
- //test_all<bg::model::d2::point_xy<ttmath_big> >();
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
 #endif
 
     return 0;

Modified: trunk/libs/geometry/test/multi/algorithms/multi_union.cpp
==============================================================================
--- trunk/libs/geometry/test/multi/algorithms/multi_union.cpp (original)
+++ trunk/libs/geometry/test/multi/algorithms/multi_union.cpp 2012-02-03 14:15:02 EST (Fri, 03 Feb 2012)
@@ -134,7 +134,7 @@
     test_all<bg::model::d2::point_xy<double> >();
 
 #ifdef HAVE_TTMATH
- //test_all<bg::model::d2::point_xy<ttmath_big> >();
+ test_all<bg::model::d2::point_xy<ttmath_big> >();
 #endif
 
     return 0;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk