Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r71722 - trunk/libs/geometry/test/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-05-04 16:41:18


Author: barendgehrels
Date: 2011-05-04 16:41:17 EDT (Wed, 04 May 2011)
New Revision: 71722
URL: http://svn.boost.org/trac/boost/changeset/71722

Log:
Added test for box-in-box
Text files modified:
   trunk/libs/geometry/test/algorithms/within.cpp | 9 +++++++--
   1 files changed, 7 insertions(+), 2 deletions(-)

Modified: trunk/libs/geometry/test/algorithms/within.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/within.cpp (original)
+++ trunk/libs/geometry/test/algorithms/within.cpp 2011-05-04 16:41:17 EDT (Wed, 04 May 2011)
@@ -33,8 +33,13 @@
     test_geometry<P, bg::model::polygon<P> >("POINT(2 2)",
         "POLYGON((0 0,0 4,4 4,4 0,0 0),(1 1,3 1,3 3,1 3,1 1))", false);
 
+ typedef bg::model::box<P> box_type;
+
+ test_geometry<P, box_type>("POINT(1 1)", "BOX(0 0,2 2)", true);
+
+ test_geometry<box_type, box_type>("BOX(1 1,2 2)", "BOX(0 0,3 3)", true);
+ test_geometry<box_type, box_type>("BOX(0 0,3 3)", "BOX(1 1,2 2)", false);
 
- test_geometry<P, bg::model::box<P> >("POINT(1 1)", "BOX(0 0,2 2)", true);
 
     // Mixed point types
     test_geometry
@@ -45,7 +50,7 @@
 
 
     // Real-life problem (solved now), point is in the middle, 409623 is also a coordinate
- // on the border, it was wrong first.
+ // on the border, has been wrong in the past (2009)
     test_ring<P>("POINT(146383 409623)",
         "POLYGON((146351 410597,146521 410659,147906 410363,148088 410420"
         ",148175 410296,148281 409750,148215 409623,148154 409666,148154 409666"


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