[geos-commits] [SCM] geos branch master updated. 2c8c5fd9fb237b48927618c9efc84062b1285af1

git at osgeo.org git at osgeo.org
Thu Sep 14 01:20:03 PDT 2017


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  2c8c5fd9fb237b48927618c9efc84062b1285af1 (commit)
       via  d78d4e4655afb4d71b12fd51b917e813bd57a6ff (commit)
       via  344bbdefb7a08c9bb21d6ea88c9b850263d53f50 (commit)
       via  d7e6a0f995165a2099970997b0088dd292fb9a32 (commit)
      from  780221a5aa171f247d097f95cfbbde2049811ab2 (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 2c8c5fd9fb237b48927618c9efc84062b1285af1
Merge: 780221a d78d4e4
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Sep 14 01:20:03 2017 -0700

    Merge branch 'snap-interrupt' of pramsey/geos into master


commit d78d4e4655afb4d71b12fd51b917e813bd57a6ff
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Sep 12 13:39:29 2017 -0700

    Renumber units tests

diff --git a/tests/unit/capi/GEOSInterruptTest.cpp b/tests/unit/capi/GEOSInterruptTest.cpp
index f7d5768..5d10c7b 100644
--- a/tests/unit/capi/GEOSInterruptTest.cpp
+++ b/tests/unit/capi/GEOSInterruptTest.cpp
@@ -102,7 +102,7 @@ namespace tut
     /// Test interrupt callback being called XXX
     template<>
     template<>
-    void object::test<1>()
+    void object::test<2>()
     {
         numcalls = 0;
 
@@ -135,7 +135,7 @@ namespace tut
     /// Test interrupt callback being NOT reset by initGEOS
     template<>
     template<>
-    void object::test<2>()
+    void object::test<3>()
     {
         numcalls = 0;
 
@@ -166,7 +166,7 @@ namespace tut
     /// Test interrupting from callback
     template<>
     template<>
-    void object::test<3>()
+    void object::test<4>()
     {
         initGEOS(notice, notice);
 
@@ -189,7 +189,7 @@ namespace tut
     /// Test chaining interrupt callbacks
     template<>
     template<>
-    void object::test<4>()
+    void object::test<5>()
     {
         numcalls = 0;
 

commit 344bbdefb7a08c9bb21d6ea88c9b850263d53f50
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Tue Sep 12 13:38:55 2017 -0700

    Add unit test per strk

diff --git a/tests/unit/capi/GEOSInterruptTest.cpp b/tests/unit/capi/GEOSInterruptTest.cpp
index d6af7f3..f7d5768 100644
--- a/tests/unit/capi/GEOSInterruptTest.cpp
+++ b/tests/unit/capi/GEOSInterruptTest.cpp
@@ -99,6 +99,39 @@ namespace tut
         finishGEOS();
     }
 
+    /// Test interrupt callback being called XXX
+    template<>
+    template<>
+    void object::test<1>()
+    {
+        numcalls = 0;
+
+        initGEOS(notice, notice);
+
+        GEOS_interruptRegisterCallback(countCalls);
+
+        ensure_equals(numcalls, 0);
+
+        GEOSGeometry *geom1 = GEOSGeomFromWKT("LINESTRING(0 0, 1 1, 2 2, 4 4)");
+        GEOSGeometry *geom2 = GEOSGeomFromWKT("LINESTRING(0 0, 1 1.01, 4 4.001)");
+
+        ensure("GEOSGeomFromWKT failed", nullptr != geom1);
+
+		GEOSGeometry *geom3 = GEOSSnap(geom1, geom2, 0.1);
+
+        ensure("GEOSSnap failed", nullptr != geom3);
+
+        ensure("interrupt callback never called", numcalls > 0);
+
+        GEOSGeom_destroy(geom1);
+        GEOSGeom_destroy(geom2);
+        GEOSGeom_destroy(geom3);
+
+        GEOS_interruptRegisterCallback(nullptr); /* unregister */
+
+        finishGEOS();
+    }
+	
     /// Test interrupt callback being NOT reset by initGEOS
     template<>
     template<>

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

Summary of changes:
 src/operation/overlay/snap/LineStringSnapper.cpp |    4 +++
 tests/unit/capi/GEOSInterruptTest.cpp            |   39 ++++++++++++++++++++--
 2 files changed, 40 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
geos


More information about the geos-commits mailing list