$include_dir="/home/hyper-archives/boost-commit/include"; include("$include_dir/msg-header.inc") ?>
Subject: [Boost-commit] svn:boost r73319 - in trunk/libs/geometry/test: algorithms multi/algorithms
From: barend.gehrels_at_[hidden]
Date: 2011-07-24 05:08:27
Author: barendgehrels
Date: 2011-07-24 05:08:26 EDT (Sun, 24 Jul 2011)
New Revision: 73319
URL: http://svn.boost.org/trac/boost/changeset/73319
Log:
Changes intersection tests because output is unique now.
Text files modified: 
   trunk/libs/geometry/test/algorithms/difference.cpp             |    10 ++++++++--                              
   trunk/libs/geometry/test/algorithms/intersection.cpp           |    10 ++++++++++                              
   trunk/libs/geometry/test/algorithms/test_difference.hpp        |     4 ----                                    
   trunk/libs/geometry/test/algorithms/test_intersection.hpp      |    21 ++++-----------------                   
   trunk/libs/geometry/test/algorithms/test_union.hpp             |     5 -----                                   
   trunk/libs/geometry/test/multi/algorithms/multi_difference.cpp |     2 +-                                      
   6 files changed, 23 insertions(+), 29 deletions(-)
Modified: trunk/libs/geometry/test/algorithms/difference.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/difference.cpp	(original)
+++ trunk/libs/geometry/test/algorithms/difference.cpp	2011-07-24 05:08:26 EDT (Sun, 24 Jul 2011)
@@ -218,6 +218,13 @@
         1, 0, 3200.4,
         0.01);
 
+    test_one<polygon, polygon, polygon>("ggl_list_20110716_enrico",
+        ggl_list_20110716_enrico[0], ggl_list_20110716_enrico[1],
+        3, 0, 35723.8506317139,
+        1, 0, 58456.4964294434
+        );
+
+
 #ifdef _MSC_VER
     // 2011-07-02
     // Interesting FP-precision case.
@@ -229,8 +236,7 @@
     test_one<polygon, polygon, polygon>("ggl_list_20110627_phillip",
         ggl_list_20110627_phillip[0], ggl_list_20110627_phillip[1],
         if_typed<ct, double>(0, 1), 0, 
-            if_typed<ct, double>(0.0, if_typed<ct, float>(0.000383878, 
-                        0.0000000000001105367)), 
+            if_typed_tt<ct>(0.0000000000001105367, 0.0), 
         1, 0, 3577.40960816756,
         0.01
         );
Modified: trunk/libs/geometry/test/algorithms/intersection.cpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/intersection.cpp	(original)
+++ trunk/libs/geometry/test/algorithms/intersection.cpp	2011-07-24 05:08:26 EDT (Sun, 24 Jul 2011)
@@ -184,6 +184,16 @@
         ggl_list_20110627_phillip[0], ggl_list_20110627_phillip[1],
         1, if_typed_tt<ct>(6, 5), 11151.6618);
 
+    test_one<Polygon, Polygon, Polygon>("ggl_list_20110716_enrico",
+        ggl_list_20110716_enrico[0], ggl_list_20110716_enrico[1],
+        3, 
+#ifdef _MSC_VER
+        if_typed<ct, float>(20, 22), 
+#else
+        20,
+#endif
+        35723.8506317139);
+
     return;
 
 
Modified: trunk/libs/geometry/test/algorithms/test_difference.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_difference.hpp	(original)
+++ trunk/libs/geometry/test/algorithms/test_difference.hpp	2011-07-24 05:08:26 EDT (Sun, 24 Jul 2011)
@@ -23,7 +23,6 @@
 
 #include <boost/geometry/algorithms/area.hpp>
 #include <boost/geometry/algorithms/num_points.hpp>
-#include <boost/geometry/algorithms/unique.hpp>
 
 #include <boost/geometry/geometries/geometries.hpp>
 
@@ -73,9 +72,6 @@
     {
         if (expected_point_count > 0)
         {
-            // Get a correct point-count without duplicate points
-            // (note that overlay might be adapted to avoid duplicates)
-            bg::unique(*it);
             n += bg::num_points(*it);
         }
 
Modified: trunk/libs/geometry/test/algorithms/test_intersection.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_intersection.hpp	(original)
+++ trunk/libs/geometry/test/algorithms/test_intersection.hpp	2011-07-24 05:08:26 EDT (Sun, 24 Jul 2011)
@@ -20,7 +20,6 @@
 #include <boost/geometry/algorithms/correct.hpp>
 #include <boost/geometry/algorithms/length.hpp>
 #include <boost/geometry/algorithms/num_points.hpp>
-#include <boost/geometry/algorithms/unique.hpp>
 
 #include <boost/geometry/geometries/geometries.hpp>
 
@@ -41,8 +40,7 @@
         G1 const& g1, G2 const& g2,
         std::size_t expected_count = 0, std::size_t expected_point_count = 0,
         double expected_length_or_area = 0,
-        double percentage = 0.0001,
-        bool make_unique = true)
+        double percentage = 0.0001)
 {
     static const bool is_line = bg::geometry_id<OutputType>::type::value == 2;
 
@@ -78,17 +76,7 @@
     {
         if (expected_point_count > 0)
         {
-            if (make_unique)
-            {
-                // Get a correct point-count without duplicate points
-                // (note that overlay might be adapted to avoid duplicates)
-                bg::unique(*it);
-                n += bg::num_points(*it, true);
-            }
-            else
-            {
-                n += bg::num_points(*it, true);
-            }
+            n += bg::num_points(*it, true);
         }
 
         // instead of specialization we check it run-time here
@@ -179,8 +167,7 @@
         std::string const& wkt1, std::string const& wkt2,
         std::size_t expected_count = 0, std::size_t expected_point_count = 0,
         double expected_length_or_area = 0,
-        double percentage = 0.0001,
-        bool make_unique = true)
+        double percentage = 0.0001)
 {
     G1 g1;
     bg::read_wkt(wkt1, g1);
@@ -194,7 +181,7 @@
 
     return test_intersection<OutputType, void>(caseid, g1, g2,
         expected_count, expected_point_count,
-        expected_length_or_area, percentage, make_unique);
+        expected_length_or_area, percentage);
 }
 
 
Modified: trunk/libs/geometry/test/algorithms/test_union.hpp
==============================================================================
--- trunk/libs/geometry/test/algorithms/test_union.hpp	(original)
+++ trunk/libs/geometry/test/algorithms/test_union.hpp	2011-07-24 05:08:26 EDT (Sun, 24 Jul 2011)
@@ -21,7 +21,6 @@
 #include <boost/geometry/algorithms/correct.hpp>
 #include <boost/geometry/algorithms/length.hpp>
 #include <boost/geometry/algorithms/num_points.hpp>
-#include <boost/geometry/algorithms/unique.hpp>
 
 #include <boost/geometry/geometries/geometries.hpp>
 
@@ -55,10 +54,6 @@
         area += bg::area(*it);
         holes += bg::num_interior_rings(*it);
 
-        // Get a correct point-count without duplicate points
-        // (note that overlay might be adapted to avoid duplicates)
-        OutputType simplified;
-        bg::unique(*it);
         n += bg::num_points(*it, true);
     }
 
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	2011-07-24 05:08:26 EDT (Sun, 24 Jul 2011)
@@ -11,7 +11,7 @@
 #include <string>
 
 // #define BOOST_GEOMETRY_DEBUG_ASSEMBLE
-#define BOOST_GEOMETRY_CHECK_WITH_SQLSERVER
+//#define BOOST_GEOMETRY_CHECK_WITH_SQLSERVER
 
 #include <algorithms/test_difference.hpp>
 #include <algorithms/test_overlay.hpp>