Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r75784 - trunk/libs/geometry/test/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-12-03 05:35:03


Author: barendgehrels
Date: 2011-12-03 05:35:02 EST (Sat, 03 Dec 2011)
New Revision: 75784
URL: http://svn.boost.org/trac/boost/changeset/75784

Log:
Updated unit tests for convert (3D segment -> linestring) and updated values for 3D to avoid index-confusion

Text files modified:
   trunk/libs/geometry/test/algorithms/convert.cpp | 34 ++++++++++++++++++++++++++++++----
   1 files changed, 30 insertions(+), 4 deletions(-)

Modified: trunk/libs/geometry/test/algorithms/convert.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/convert.cpp (original)
+++ trunk/libs/geometry/test/algorithms/convert.cpp 2011-12-03 05:35:02 EST (Sat, 03 Dec 2011)
@@ -28,13 +28,15 @@
         <
             bg::model::box<Point1>,
             bg::model::box<Point2>
- >("POLYGON((1 2,1 4,3 4,3 2,1 2))");
+ >
+ ("POLYGON((1 2,1 4,3 4,3 2,1 2))");
 
     test_mixed_identical_result
         <
             bg::model::segment<Point1>,
             bg::model::segment<Point2>
- >("LINESTRING(1 1,2 2)");
+ >
+ ("LINESTRING(1 1,2 2)");
 
     // Linestring
     test_mixed_identical_result
@@ -51,6 +53,7 @@
             bg::model::ring<Point2>
>
         ("POLYGON((1 1,2 2,3 0,1 1))");
+
     test_mixed_reversible_result
         <
             bg::model::ring<Point1, true>,
@@ -60,6 +63,7 @@
             "POLYGON((1 1,2 2,3 0,1 1))",
             "POLYGON((1 1,3 0,2 2,1 1))"
         );
+
     test_mixed
         <
             bg::model::ring<Point1, true, true>,
@@ -69,6 +73,7 @@
             "POLYGON((1 1,2 2,3 0,1 1))",
             "POLYGON((1 1,2 2,3 0))"
         );
+
     test_mixed
         <
             bg::model::ring<Point1, true, false>,
@@ -89,6 +94,7 @@
             "POLYGON((0 0,0 5,5 5,5 0,0 0),(1 1,3 2,2 4,1 1))",
             "POLYGON((0 0,5 0,5 5,0 5,0 0),(1 1,2 4,3 2,1 1))"
         );
+
     test_mixed
         <
             bg::model::polygon<Point1>,
@@ -108,6 +114,7 @@
             bg::model::ring<Point2>
>
         ("POLYGON((1 1,2 2,3 0,1 1))");
+
     test_mixed_reversible_result
         <
             bg::model::polygon<Point1, true>,
@@ -117,6 +124,7 @@
             "POLYGON((1 1,2 2,3 0,1 1))",
             "POLYGON((1 1,3 0,2 2,1 1))"
         );
+
     // Any hole will be omitted going from polygon to ring
     test_mixed
         <
@@ -160,6 +168,7 @@
             "BOX(0 0,2 2)",
             "POLYGON((0 0,0 2,2 2,2 0,0 0))"
         );
+
     test_mixed
         <
             bg::model::box<Point1>,
@@ -169,6 +178,7 @@
             "BOX(0 0,2 2)",
             "POLYGON((0 0,2 0,2 2,0 2,0 0))"
         );
+
     test_mixed
         <
             bg::model::box<Point1>,
@@ -178,6 +188,7 @@
             "BOX(0 0,2 2)",
             "POLYGON((0 0,0 2,2 2,2 0))"
         );
+
     test_mixed
         <
             bg::model::box<Point1>,
@@ -198,6 +209,7 @@
             "BOX(0 0,2 2)",
             "POLYGON((0 0,0 2,2 2,2 0,0 0))"
         );
+
     test_mixed
         <
             bg::model::box<Point1>,
@@ -207,6 +219,7 @@
             "BOX(0 0,2 2)",
             "POLYGON((0 0,2 0,2 2,0 2,0 0))"
         );
+
     test_mixed
         <
             bg::model::box<Point1>,
@@ -216,6 +229,7 @@
             "BOX(0 0,2 2)",
             "POLYGON((0 0,0 2,2 2,2 0))"
         );
+
     test_mixed
         <
             bg::model::box<Point1>,
@@ -237,7 +251,8 @@
         <
             bg::model::segment<Point1>,
             bg::model::segment<Point2>
- >("LINESTRING(1 1 1,2 2 2)");
+ >
+ ("LINESTRING(1 2 3,4 5 6)");
 
     // Linestring
     test_mixed_identical_result
@@ -245,7 +260,18 @@
             bg::model::linestring<Point1>,
             bg::model::linestring<Point2>
>
- ("LINESTRING(1 1 1,2 2 2,3 3 3)");
+ ("LINESTRING(1 2 3,4 5 6,7 8 9)");
+
+ // segment -> line
+ test_mixed
+ <
+ bg::model::segment<Point1>,
+ bg::model::linestring<Point2>
+ >
+ (
+ "LINESTRING(1 2 3,4 5 6)",
+ "LINESTRING(1 2 3,4 5 6)"
+ );
 }
 
 


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