[geos-commits] r4005 - trunk/tests/unit/triangulate

svn_geos at osgeo.org svn_geos at osgeo.org
Tue Sep 16 01:50:45 PDT 2014


Author: strk
Date: 2014-09-16 01:50:44 -0700 (Tue, 16 Sep 2014)
New Revision: 4005

Modified:
   trunk/tests/unit/triangulate/VoronoiTest.cpp
Log:
Have VoronoiTest print expected/obtained on failure

Modified: trunk/tests/unit/triangulate/VoronoiTest.cpp
===================================================================
--- trunk/tests/unit/triangulate/VoronoiTest.cpp	2014-09-15 16:09:56 UTC (rev 4004)
+++ trunk/tests/unit/triangulate/VoronoiTest.cpp	2014-09-16 08:50:44 UTC (rev 4005)
@@ -62,8 +62,15 @@
 		results->normalize();
 		expected->normalize();
 
-		ensure(results->equalsExact(expected.get(), 1e-7));
-		ensure(results->getCoordinateDimension() == expected->getCoordinateDimension());
+		ensure_equals(results->getCoordinateDimension(), expected->getCoordinateDimension());
+		bool eq = results->equalsExact(expected.get(), 1e-7);
+		if ( ! eq ) {
+			writer.setTrim(true);
+			cout << endl;
+			cout << " Expected: " << writer.write(expected.get()) << endl;
+			cout << " Obtained: " << writer.write(results.get()) << endl;
+		}
+		ensure(eq);
 
 	}
 



More information about the geos-commits mailing list