[geos-commits] r2641 - trunk/tests/xmltester

svn_geos at osgeo.org svn_geos at osgeo.org
Wed Sep 30 18:18:38 EDT 2009


Author: strk
Date: 2009-09-30 18:18:38 -0400 (Wed, 30 Sep 2009)
New Revision: 2641

Modified:
   trunk/tests/xmltester/SingleSidedBufferResultMatcher.cpp
Log:
Check hausdorff distance in both directions, or an expected output line longer than the obtained one would be found as correct


Modified: trunk/tests/xmltester/SingleSidedBufferResultMatcher.cpp
===================================================================
--- trunk/tests/xmltester/SingleSidedBufferResultMatcher.cpp	2009-09-30 20:27:47 UTC (rev 2640)
+++ trunk/tests/xmltester/SingleSidedBufferResultMatcher.cpp	2009-09-30 22:18:38 UTC (rev 2641)
@@ -50,13 +50,23 @@
 		return false;
 	}
 
+
+   // NOTE: we need to test hausdorff distance in both directions
+
 	if (! isBoundaryHausdorffDistanceInTolerance(actualBuffer,
 	           expectedBuffer, distance))
 	{
-std::cerr << "isBoundaryHasudorffDistanceInTolerance failed" << std::endl;
+std::cerr << "isBoundaryHasudorffDistanceInTolerance failed (actual,expected)" << std::endl;
 		return false;
 	}
 
+	if (! isBoundaryHausdorffDistanceInTolerance(expectedBuffer,
+	           actualBuffer, distance))
+	{
+std::cerr << "isBoundaryHasudorffDistanceInTolerance failed (expected,actual)" << std::endl;
+		return false;
+	}
+
 	return true;
 }
 



More information about the geos-commits mailing list