[geos-commits] [SCM] GEOS branch master updated. 04e07b0338860081c3b24073c6e76b832a917a02

git at osgeo.org git at osgeo.org
Fri Apr 12 12:21:40 PDT 2019


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GEOS".

The branch, master has been updated
       via  04e07b0338860081c3b24073c6e76b832a917a02 (commit)
      from  a276208d4e887895ce841f76d5a71131d7f49cc1 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 04e07b0338860081c3b24073c6e76b832a917a02
Author: Martin Davis <mtnclimb at gmail.co>
Date:   Fri Apr 12 12:21:26 2019 -0700

    Add XMLTester time output for -v

diff --git a/tests/xmltester/XMLTester.cpp b/tests/xmltester/XMLTester.cpp
index 3b65168..e214278 100644
--- a/tests/xmltester/XMLTester.cpp
+++ b/tests/xmltester/XMLTester.cpp
@@ -367,24 +367,26 @@ XMLTester::printTest(bool success, const std::string& expected_result, const std
         std::cout << ": " << (success ? "ok." : "failed.");
         std::cout << " (" << std::setprecision(15) << java_math_round(prof.getTot() / 1000) << " ms)" << std::endl;
 
-        std::cout << "\tDescription: " << curr_case_desc << std::endl;
+        // print geometry etc for -v -v and above
+        if (verbose > 1) {
+            std::cout << "\tDescription: " << curr_case_desc << std::endl;
 
+            if(gA) {
+                std::cout << "\tGeometry A: ";
+                printGeom(std::cout, gA);
+                std::cout << std::endl;
+            }
 
-        if(gA) {
-            std::cout << "\tGeometry A: ";
-            printGeom(std::cout, gA);
-            std::cout << std::endl;
-        }
+            if(gB) {
+                std::cout << "\tGeometry B: ";
+                printGeom(std::cout, gB);
+                std::cout << std::endl;
+            }
 
-        if(gB) {
-            std::cout << "\tGeometry B: ";
-            printGeom(std::cout, gB);
+            std::cout << "\tExpected result: " << expected_result << std::endl;
+            std::cout << "\tObtained result: " << actual_result << std::endl;
             std::cout << std::endl;
         }
-
-        std::cout << "\tExpected result: " << expected_result << std::endl;
-        std::cout << "\tObtained result: " << actual_result << std::endl;
-        std::cout << std::endl;
     }
 }
 
@@ -936,6 +938,8 @@ XMLTester::parseTest(const tinyxml2::XMLNode* node)
         else if(opName == "union") {
             GeomPtr gRes(parseGeometry(opRes, "expected"));
 
+            profile.start();
+
             GeomPtr gRealRes;
             if(gB) {
 #ifndef USE_BINARYOP
@@ -948,6 +952,8 @@ XMLTester::parseTest(const tinyxml2::XMLNode* node)
                 gRealRes = gA->Union();
             }
 
+            profile.stop();
+
             success = checkOverlaySuccess(*gRes, *gRealRes);
 
             actual_result = printGeom(gRealRes.get());
@@ -1831,7 +1837,7 @@ XMLTester::parseTest(const tinyxml2::XMLNode* node)
         ++failed;
     }
 
-    if((!success && verbose) || verbose > 1) {
+    if((!success && verbose) || verbose > 0) {
         printTest(!!success, expected_result, actual_result, profile);
     }
 

-----------------------------------------------------------------------

Summary of changes:
 tests/xmltester/XMLTester.cpp | 34 ++++++++++++++++++++--------------
 1 file changed, 20 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list