[geos-commits] r3261 - in trunk: . tests/unit/operation/distance

svn_geos at osgeo.org svn_geos at osgeo.org
Wed Mar 2 08:45:31 EST 2011


Author: strk
Date: 2011-03-02 05:45:31 -0800 (Wed, 02 Mar 2011)
New Revision: 3261

Modified:
   trunk/NEWS
   trunk/tests/unit/operation/distance/DistanceOpTest.cpp
Log:
Tweak unit test to expect distance 0 between an empty an anything else. Report the change in NEWS file.

Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2011-03-02 13:45:22 UTC (rev 3260)
+++ trunk/NEWS	2011-03-02 13:45:31 UTC (rev 3261)
@@ -27,6 +27,7 @@
   - Polygonizer::getInvalidRingLines returns by const ref and retains
     ownership of vector elements
   - Empty LinearRings are closed by definition
+  - Fixed Geometry.distance() and DistanceOp to return 0.0 for empty inputs
 - Bug fixes:
   - Invalid compound geometries reported as valid (#333)
   - Return up to 15 digits of precision from GEOSisValidReason_t (#329)

Modified: trunk/tests/unit/operation/distance/DistanceOpTest.cpp
===================================================================
--- trunk/tests/unit/operation/distance/DistanceOpTest.cpp	2011-03-02 13:45:22 UTC (rev 3260)
+++ trunk/tests/unit/operation/distance/DistanceOpTest.cpp	2011-03-02 13:45:31 UTC (rev 3261)
@@ -220,7 +220,7 @@
 
 		DistanceOp dist(g0.get(), g1.get());
 
-		ensure_equals(dist.distance(), DoubleMax);
+		ensure_equals(dist.distance(), 0);
 
 		ensure_equals(dist.closestPoints(), (void*)0);
 	}
@@ -398,7 +398,7 @@
 
 		DistanceOp dist(g0.get(), g1.get());
 
-		ensure_equals(dist.distance(), DoubleMax);
+		ensure_equals(dist.distance(), 0);
 
         	ensure_equals(dist.closestPoints(), (void*)0);
 



More information about the geos-commits mailing list