Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r73315 - in trunk/libs/geometry/test/algorithms: . overlay
From: barend.gehrels_at_[hidden]
Date: 2011-07-24 04:12:14


Author: barendgehrels
Date: 2011-07-24 04:12:10 EDT (Sun, 24 Jul 2011)
New Revision: 73315
URL: http://svn.boost.org/trac/boost/changeset/73315

Log:
Fix in double coordinates in test
Use type_tt in union test, added test for recent ticket
Text files modified:
   trunk/libs/geometry/test/algorithms/overlay/get_turns.cpp | 4 ++++
   trunk/libs/geometry/test/algorithms/overlay/overlay_cases.hpp | 5 +++++
   trunk/libs/geometry/test/algorithms/test_overlay.hpp | 2 +-
   trunk/libs/geometry/test/algorithms/union.cpp | 16 ++++++++++++----
   4 files changed, 22 insertions(+), 5 deletions(-)

Modified: trunk/libs/geometry/test/algorithms/overlay/get_turns.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/overlay/get_turns.cpp (original)
+++ trunk/libs/geometry/test/algorithms/overlay/get_turns.cpp 2011-07-24 04:12:10 EDT (Sun, 24 Jul 2011)
@@ -303,6 +303,10 @@
             4,
             ggl_list_20110306_javier[0], ggl_list_20110306_javier[1]);
 
+ test_get_turns<polygon, polygon>::apply("ggl_list_20110716_enrico",
+ 4,
+ ggl_list_20110716_enrico[0], ggl_list_20110716_enrico[1]);
+
 
     // pies
     test_get_turns<polygon, polygon>::apply("pie_23_16_16", 3, pie_23_16_16[0], pie_23_16_16[1]);

Modified: trunk/libs/geometry/test/algorithms/overlay/overlay_cases.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/overlay/overlay_cases.hpp (original)
+++ trunk/libs/geometry/test/algorithms/overlay/overlay_cases.hpp 2011-07-24 04:12:10 EDT (Sun, 24 Jul 2011)
@@ -505,6 +505,11 @@
     "POLYGON((437.35 142.03,461.94 281.32,564.5 263.26,539.9 123.97,437.35 142.03))"
     };
 
+static std::string ggl_list_20110716_enrico[2] =
+ {
+ "POLYGON((1.83691e-014 -300,-259.808 -150,-259.808 150,-5.51073e-014 300,259.808 150,259.808 -150,9.18455e-014 -300,1.83691e-014 -300),(7.65379e-014 -250,216.506 -125,216.506 125,-4.59227e-014 250,-216.506 125,-216.506 -125,1.53076e-014 -250,7.65379e-014 -250))",
+ "POLYGON((1.83691e-014 -300,-259.808 -150,-216.506 -125,-216.506 125,-259.808 150,-5.51073e-014 300,-4.59227e-014 250,216.506 125,259.808 150,259.808 -150,216.506 -125,7.65379e-014 -250,9.18455e-014 -300,1.83691e-014 -300),(6.12303e-014 -200,173.205 -100,173.205 100,-3.67382e-014 200,-173.205 100,-173.205 -100,1.22461e-014 -200,6.12303e-014 -200))"
+ };
 
 
 // GEOS "TestOverlay" test.

Modified: trunk/libs/geometry/test/algorithms/test_overlay.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_overlay.hpp (original)
+++ trunk/libs/geometry/test/algorithms/test_overlay.hpp 2011-07-24 04:12:10 EDT (Sun, 24 Jul 2011)
@@ -144,7 +144,7 @@
 
 // within each other, having no intersections but many holes within each other
 static std::string winded[2] =
- {"POLYGON((0 0,0 11,11 11,11 0,0 0),(3 3,4 3,4 4,3 4,3 3),(5 3,6 3,6 4,5 4,5 3),(2 6,7 6,7 6,7 9,2 9,2 6),(9 2,10 2,10 5,9 5,9 2))",
+ {"POLYGON((0 0,0 11,11 11,11 0,0 0),(3 3,4 3,4 4,3 4,3 3),(5 3,6 3,6 4,5 4,5 3),(2 6,7 6,7 9,2 9,2 6),(9 2,10 2,10 5,9 5,9 2))",
     "POLYGON((1 1,1 10,10 10,10 6,8 6,8 1,1 1),(2 2,7 2,7 5,2 5,2 2),(3 7,4 7,4 8,3 8,3 7),(5 7,6 7,6 8,5 8,5 7),(8 7,9 7,9 8,8 8,8 7))"};
 
 static std::string within_holes_disjoint[2] =

Modified: trunk/libs/geometry/test/algorithms/union.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/union.cpp (original)
+++ trunk/libs/geometry/test/algorithms/union.cpp 2011-07-24 04:12:10 EDT (Sun, 24 Jul 2011)
@@ -229,18 +229,26 @@
         if_typed<ct, double>(5, if_typed_tt<ct>(8, 7)),
         14729.07145);
         
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20110716_enrico",
+ ggl_list_20110716_enrico[0], ggl_list_20110716_enrico[1],
+ 1, 1,
+#ifdef _MSC_VER
+ if_typed<ct, double>(18, 17),
+#else
+ 17,
+#endif
+ 129904.197692871);
+
 
 #ifdef _MSC_VER
     {
         // Isovist (submitted by Brandon during Formal Review)
- std::string tn = string_from_type<typename bg::coordinate_type<Polygon>::type>::name();
         test_one<Polygon, Polygon, Polygon>("isovist",
             isovist1[0], isovist1[1],
             1,
             0,
- tn == std::string("f") ? 71
- : tn == std::string("d") ? 72
- : 73,
+ if_typed<ct, float>(71,
+ if_typed<ct, double>(72, 73)),
             313.36036462);
     }
 #endif


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