Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r86769 - in trunk/libs/geometry/test/algorithms: . overlay
From: barend.gehrels_at_[hidden]
Date: 2013-11-19 16:12:51


Author: barendgehrels
Date: 2013-11-19 16:12:50 EST (Tue, 19 Nov 2013)
New Revision: 86769
URL: http://svn.boost.org/trac/boost/changeset/86769

Log:
[geometry] Added testcase for mailed supposed error. Moved pie-test to header conform other testcases

Text files modified:
   trunk/libs/geometry/test/algorithms/intersection.cpp | 19 +++++++++----------
   trunk/libs/geometry/test/algorithms/overlay/overlay_cases.hpp | 11 +++++++++++
   trunk/libs/geometry/test/algorithms/overlay/self_intersection_points.cpp | 3 ++-
   3 files changed, 22 insertions(+), 11 deletions(-)

Modified: trunk/libs/geometry/test/algorithms/intersection.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/intersection.cpp Tue Nov 19 14:52:02 2013 (r86768)
+++ trunk/libs/geometry/test/algorithms/intersection.cpp 2013-11-19 16:12:50 EST (Tue, 19 Nov 2013) (r86769)
@@ -32,19 +32,9 @@
 BOOST_GEOMETRY_REGISTER_LINESTRING_TEMPLATED(std::vector)
 
 
-static std::string pie_2_3_23_0[2] =
-{
- "POLYGON((2500 2500,2855 3828,2500 3875,2500 2500))",
- "POLYGON((2500 2500,2791 3586,2499 3625,2208 3586,2500 2500))"
-};
-
 template <typename Polygon>
 void test_areal()
 {
- test_one<Polygon, Polygon, Polygon>("pie_2_3_23_0",
- pie_2_3_23_0[0], pie_2_3_23_0[1],
- 1, 4, 163292.679042133, 0.1);
-
     test_one<Polygon, Polygon, Polygon>("simplex_with_empty_1",
         simplex_normal[0], polygon_empty,
         0, 0, 0.0);
@@ -154,6 +144,11 @@
         crossed[0], crossed[1],
         3, 0, 1.5);
 
+ test_one<Polygon, Polygon, Polygon>("pie_2_3_23_0",
+ pie_2_3_23_0[0], pie_2_3_23_0[1],
+ 1, 4, 163292.679042133, 0.1);
+
+
     typedef typename bg::coordinate_type<Polygon>::type ct;
     bool const ccw = bg::point_order<Polygon>::value == bg::counterclockwise;
     bool const open = bg::closure<Polygon>::value == bg::open;
@@ -199,6 +194,10 @@
     }
 #endif
 
+ test_one<Polygon, Polygon, Polygon>("ggl_list_20131119_james",
+ ggl_list_20131119_james[0], ggl_list_20131119_james[1],
+ 1, 4, 6.6125873045, 0.1);
+
     test_one<Polygon, Polygon, Polygon>("buffer_rt_f", buffer_rt_f[0], buffer_rt_f[1],
                 1, 4, 0.00029437899183903937, 0.01);
 

Modified: trunk/libs/geometry/test/algorithms/overlay/overlay_cases.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/overlay/overlay_cases.hpp Tue Nov 19 14:52:02 2013 (r86768)
+++ trunk/libs/geometry/test/algorithms/overlay/overlay_cases.hpp 2013-11-19 16:12:50 EST (Tue, 19 Nov 2013) (r86769)
@@ -390,6 +390,11 @@
     "POLYGON((2500 2500,1704 1704,1525 1937,2500 2500))"
     };
 
+static std::string pie_2_3_23_0[2] =
+{
+ "POLYGON((2500 2500,2855 3828,2500 3875,2500 2500))",
+ "POLYGON((2500 2500,2791 3586,2499 3625,2208 3586,2500 2500))"
+};
 
 // Shifted pies
 static std::string pie_20_20_7_100[2] = {
@@ -526,6 +531,12 @@
     "POLYGON((0.24806946917841693 26.015444246572663,31.751930530821582 33.984555753427337,32.248069469178418 30.015444246572663,0.24806946917841693 26.015444246572663))"
 };
 
+static std::string ggl_list_20131119_james[2] =
+{
+ "POLYGON((7 8,6.42705 6.23664,4.92705 5.14683,3.07295 5.14683,1.57295 6.23664,1 8,1.57295 9.76336,3.07295 10.8532,4.92705 10.8532,6.42705 9.76336,7 8))",
+ "POLYGON((4 4,4 8,12 8,12 4,4 4))"
+};
+
 
 // GEOS "TestOverlay" test.
 // Note that the first one WAS invalid and is made valid using SQL Server 2008 Spatial MakeValid() function

Modified: trunk/libs/geometry/test/algorithms/overlay/self_intersection_points.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/overlay/self_intersection_points.cpp Tue Nov 19 14:52:02 2013 (r86768)
+++ trunk/libs/geometry/test/algorithms/overlay/self_intersection_points.cpp 2013-11-19 16:12:50 EST (Tue, 19 Nov 2013) (r86769)
@@ -41,7 +41,6 @@
 # include <boost/geometry/io/svg/svg_mapper.hpp>
 #endif
 
-
 template <typename Geometry>
 static void test_self_intersection_points(std::string const& case_id,
             int expected_count,
@@ -243,6 +242,8 @@
     std::string const ggl_list_2013_11_06_joan = "POLYGON((137.14632454923444 200.61927877947369,50 224, 323 497,255 169,137.14632454923444 200.61927877947369))";
     test_self_overlay<polygon>("ggl_list_2013_11_06_joan", 0, ggl_list_2013_11_06_joan);
 
+ test_self_overlay<polygon>("ggl_list_20131119_james", 0, ggl_list_20131119_james[0]);
+
     // Same case - but if this is a linestring.
     // TODO: this does not compile yet, but it should return 1 intersection point at the "closing" point
     // std::string const ggl_list_2013_11_06_joan_linestring = "LINESTRING(137.14632454923444 200.61927877947369,50 224, 323 497,255 169,137.14632454923444 200.61927877947369)";


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