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

svn_geos at osgeo.org svn_geos at osgeo.org
Fri Aug 27 02:17:35 EDT 2010


Author: strk
Date: 2010-08-27 06:17:35 +0000 (Fri, 27 Aug 2010)
New Revision: 3094

Modified:
   trunk/tests/xmltester/XMLTester.cpp
Log:
Have --test-valid-output test actual result, not the expected one (more useful)


Modified: trunk/tests/xmltester/XMLTester.cpp
===================================================================
--- trunk/tests/xmltester/XMLTester.cpp	2010-08-26 23:11:49 UTC (rev 3093)
+++ trunk/tests/xmltester/XMLTester.cpp	2010-08-27 06:17:35 UTC (rev 3094)
@@ -797,7 +797,8 @@
 
 			if (gRes->compareTo(gRealRes.get())==0) success=1;
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -819,7 +820,8 @@
 
 			if (gRes->compareTo(gRealRes.get())==0) success=1;
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -841,7 +843,8 @@
 
 			if (gRes->compareTo(gRealRes.get())==0) success=1;
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -863,7 +866,8 @@
 
 			if (gRes->compareTo(gRealRes.get())==0) success=1;
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -938,7 +942,8 @@
 
 			if (gRes->compareTo(gRealRes.get())==0) success=1;
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -961,7 +966,8 @@
 
 			if (gRes->compareTo(gRealRes.get())==0) success=1;
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -993,7 +999,8 @@
 
 			if (gRes->compareTo(gRealRes.get())==0) success=1;
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -1030,7 +1037,8 @@
 			// Validate the buffer operation
 			success = checkBufferSuccess(*gRes, *gRealRes, dist);
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -1074,7 +1082,8 @@
 			success = checkSingleSidedBufferSuccess(*gRes,
 					*gRealRes, dist);
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -1111,7 +1120,8 @@
 			// Validate the buffer operation
 			success = checkBufferSuccess(*gRes, *gRealRes, dist);
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -1132,7 +1142,8 @@
 
 			if (gRes->compareTo(gRealRes.get())==0) success=1;
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -1174,7 +1185,8 @@
 
 			if (gRes->compareTo(gRealRes.get())==0) success=1;
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -1201,7 +1213,8 @@
 
 			if (gRes->compareTo(gRealRes.get())==0) success=1;
 
-			if ( testValidOutput ) testValid(gRes.get(), "result");
+			if ( testValidOutput )
+				testValid(gRealRes.get(), "result");
 
 			actual_result=printGeom(gRealRes.get());
 			expected_result=printGeom(gRes.get());
@@ -1362,7 +1375,9 @@
 	}
 	catch (...)
 	{
-		std::cerr<<"EXEPTION"<<std::endl;
+		std::cerr << "Unknown EXEPTION on case "
+		          << caseCount
+		          << std::endl;
 		actual_result = "Unknown exception thrown";
 	}
 



More information about the geos-commits mailing list