[geos-commits] [SCM] GEOS branch master updated. 06b310ddf1948ebfe0048cd33b5687f6fa279475

git at osgeo.org git at osgeo.org
Wed Aug 26 09:21:11 PDT 2020


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  06b310ddf1948ebfe0048cd33b5687f6fa279475 (commit)
       via  2c6e3bf0066f0f5a77da5752bc413d01c033e39a (commit)
       via  45df395ee640f9ad556338da936c46b860072914 (commit)
      from  7b5762bf4368f88d3276752f0541c571cef930f5 (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 06b310ddf1948ebfe0048cd33b5687f6fa279475
Merge: 45df395 2c6e3bf
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Wed Aug 26 09:21:00 2020 -0700

    Merge branch 'brm'


commit 2c6e3bf0066f0f5a77da5752bc413d01c033e39a
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Aug 25 16:36:18 2020 -0700

    Change BufferResultMatcher to static methods

diff --git a/tests/xmltester/BufferResultMatcher.cpp b/tests/xmltester/BufferResultMatcher.cpp
index 54570e3..8e17a56 100644
--- a/tests/xmltester/BufferResultMatcher.cpp
+++ b/tests/xmltester/BufferResultMatcher.cpp
@@ -28,10 +28,6 @@
 namespace geos {
 namespace xmltester {
 
-double BufferResultMatcher::MAX_RELATIVE_AREA_DIFFERENCE = 1.0E-3;
-double BufferResultMatcher::MIN_DISTANCE_TOLERANCE = 1.0e-8;
-double BufferResultMatcher::MAX_HAUSDORFF_DISTANCE_FACTOR = 100;
-
 bool
 BufferResultMatcher::isBufferResultMatch(const geom::Geometry& actualBuffer,
         const geom::Geometry& expectedBuffer,
diff --git a/tests/xmltester/BufferResultMatcher.h b/tests/xmltester/BufferResultMatcher.h
index f12cc9e..dddeec0 100644
--- a/tests/xmltester/BufferResultMatcher.h
+++ b/tests/xmltester/BufferResultMatcher.h
@@ -31,27 +31,27 @@ namespace xmltester {
 
 class BufferResultMatcher {
 public:
-    bool isBufferResultMatch(const geom::Geometry& actualBuffer,
+
+    static bool isBufferResultMatch(const geom::Geometry& actualBuffer,
                              const geom::Geometry& expectedBuffer,
                              double distance);
 
 private:
 
-    static double MAX_RELATIVE_AREA_DIFFERENCE;
-
-    static double MAX_HAUSDORFF_DISTANCE_FACTOR;
+    static constexpr double MAX_RELATIVE_AREA_DIFFERENCE = 1.0E-3;
+    static constexpr double MAX_HAUSDORFF_DISTANCE_FACTOR = 100;
 
     /*
      * The minimum distance tolerance which will be used.
      * This is required because densified vertices do no lie
      * precisely on their parent segment.
      */
-    static double MIN_DISTANCE_TOLERANCE;
+    static constexpr double MIN_DISTANCE_TOLERANCE = 1.0e-8;
 
-    bool isSymDiffAreaInTolerance(const geom::Geometry& actualBuffer,
+    static bool isSymDiffAreaInTolerance(const geom::Geometry& actualBuffer,
                                   const geom::Geometry& expectedBuffer);
 
-    bool isBoundaryHausdorffDistanceInTolerance(
+    static bool isBoundaryHausdorffDistanceInTolerance(
         const geom::Geometry& actualBuffer,
         const geom::Geometry& expectedBuffer,
         double distance);
diff --git a/tests/xmltester/XMLTester.cpp b/tests/xmltester/XMLTester.cpp
index 596fc1a..8fcf23d 100644
--- a/tests/xmltester/XMLTester.cpp
+++ b/tests/xmltester/XMLTester.cpp
@@ -216,6 +216,9 @@ checkOverlaySuccess(geom::Geometry const& gRes, geom::Geometry const& gRealRes)
 static int
 checkBufferSuccess(geom::Geometry const& gRes, geom::Geometry const& gRealRes, double dist)
 {
+
+    using geos::xmltester::BufferResultMatcher;
+
     int success = 1;
     do {
 
@@ -238,11 +241,7 @@ checkBufferSuccess(geom::Geometry const& gRes, geom::Geometry const& gRealRes, d
                       << std::endl;
         }
 
-
-        geos::xmltester::BufferResultMatcher matcher;
-        if(! matcher.isBufferResultMatch(gRealRes,
-                                         gRes,
-                                         dist)) {
+        if(!BufferResultMatcher::isBufferResultMatch(gRealRes, gRes, dist)) {
             std::cerr << "BufferResultMatcher FAILED" << std::endl;
             success = 0;
             break;

commit 45df395ee640f9ad556338da936c46b860072914
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Aug 25 16:23:08 2020 -0700

    Remove unused CTS class file

diff --git a/tests/xmltester/CTS.cpp b/tests/xmltester/CTS.cpp
deleted file mode 100644
index c11a6c9..0000000
--- a/tests/xmltester/CTS.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/**********************************************************************
- *
- * GEOS - Geometry Engine Open Source
- * http://geos.osgeo.org
- *
- * Copyright (C) 2001-2002 Vivid Solutions Inc.
- *
- * This is free software; you can redistribute and/or modify it under
- * the terms of the GNU Lesser General Public Licence as published
- * by the Free Software Foundation.
- * See the COPYING file for more information.
- *
- **********************************************************************
- *
- **********************************************************************/
-
-
-// CTS.cpp : Testing class
-//
-
-#include <iostream>
-
-#include <geos/io/ByteOrderDataInStream.h>
-#include <geos/io/ByteOrderValues.h>
-#include <geos/io/ParseException.h>
-#include <geos/io/WKBConstants.h>
-#include <geos/io/WKBReader.h>
-#include <geos/io/WKBWriter.h>
-#include <geos/io/WKTReader.h>
-#include <geos/io/WKTWriter.h>
-#include <geos/io/CLocalizer.h>
-#include <geos/geom.h>
-
-using namespace std;
-using namespace geos;
-
-int
-main(int argc, char** argv)
-{
-    try {
-        cout << "Start:" << endl;
-
-
-        cout << "End" << endl;
-    }
-    catch(const GEOSException& ge) {
-        cout << ge->toString() << endl;
-    }
-
-    return 0;
-}
-
diff --git a/tests/xmltester/Makefile.am b/tests/xmltester/Makefile.am
index 242586d..999e2aa 100644
--- a/tests/xmltester/Makefile.am
+++ b/tests/xmltester/Makefile.am
@@ -189,14 +189,8 @@ XMLTESTS=$(SAFE_XMLTESTS) $(INVALID_OUTPUT_XMLTESTS) $(FAILING_XMLTESTS)
 EXTRA_DIST += $(XMLTESTS)
 
 noinst_PROGRAMS = SimpleWKTTester XMLTester
-#bin_PROGRAMS = XMLTester
-# CTS
 
 LIBS = $(top_builddir)/src/libgeos.la
-# -lmpatrol -lbfd -lintl -liberty -limagehlp
-
-# CTS_SOURCES = CTS.cpp
-# CTS_LDADD = $(LIBS)
 
 SimpleWKTTester_SOURCES = SimpleWKTTester.cpp
 SimpleWKTTester_LDADD = $(LIBS)
diff --git a/tests/xmltester/SimpleWKTTester.cpp b/tests/xmltester/SimpleWKTTester.cpp
index bdecf6f..6125bda 100644
--- a/tests/xmltester/SimpleWKTTester.cpp
+++ b/tests/xmltester/SimpleWKTTester.cpp
@@ -13,8 +13,6 @@
  *
  **********************************************************************/
 
-// CTS.cpp : Testing class
-//
 
 #include <iostream>
 #include <fstream>

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

Summary of changes:
 tests/xmltester/BufferResultMatcher.cpp |  4 ---
 tests/xmltester/BufferResultMatcher.h   | 14 ++++-----
 tests/xmltester/CTS.cpp                 | 52 ---------------------------------
 tests/xmltester/Makefile.am             |  6 ----
 tests/xmltester/SimpleWKTTester.cpp     |  2 --
 tests/xmltester/XMLTester.cpp           |  9 +++---
 6 files changed, 11 insertions(+), 76 deletions(-)
 delete mode 100644 tests/xmltester/CTS.cpp


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list