[geos-commits] r4219 - trunk/tests/unit/capi

Mateusz Loskot mateusz at loskot.net
Wed Jun 29 07:01:55 PDT 2016


Author: mloskot
Date: 2016-06-29 07:01:54 -0700 (Wed, 29 Jun 2016)
New Revision: 4219

Modified:
   trunk/tests/unit/capi/GEOSMinimumClearanceTest.cpp
Log:
Compare inf == inf instead of ensure_equals(inf, inf).

The latter compares the difference, but inf minus inf result is indeterminate.

Modified: trunk/tests/unit/capi/GEOSMinimumClearanceTest.cpp
===================================================================
--- trunk/tests/unit/capi/GEOSMinimumClearanceTest.cpp	2016-06-09 16:25:03 UTC (rev 4218)
+++ trunk/tests/unit/capi/GEOSMinimumClearanceTest.cpp	2016-06-29 14:01:54 UTC (rev 4219)
@@ -60,7 +60,7 @@
 
             ensure(!error);
             if (clearance == std::numeric_limits<double>::infinity()) {
-                ensure_equals(d, clearance);
+                ensure(d == clearance);
             } else {
                 ensure_equals("clearance", d, clearance, 1e-12);
             }



More information about the geos-commits mailing list