[geos-commits] [SCM] GEOS branch master updated. 3bd25055aaa0f50cf4a773d95172ef150be3bca9
git at osgeo.org
git at osgeo.org
Wed May 22 08:42:45 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 3bd25055aaa0f50cf4a773d95172ef150be3bca9 (commit)
from 0d4d08f0d11eff4e331aead0d25df8fe72f451f9 (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 3bd25055aaa0f50cf4a773d95172ef150be3bca9
Author: Sandro Santilli <strk at kbt.io>
Date: Wed May 22 17:42:21 2019 +0200
Convert test for bug234 into an XMLTeste
Tweaks both autotools and CMake accordingly
diff --git a/tests/bigtest/CMakeLists.txt b/tests/bigtest/CMakeLists.txt
index 8526a6a..c8759ae 100644
--- a/tests/bigtest/CMakeLists.txt
+++ b/tests/bigtest/CMakeLists.txt
@@ -8,9 +8,6 @@
# by the Free Software Foundation.
# See the COPYING file for more information.
################################################################################
-add_executable(test_bug234 bug234.cpp)
-target_link_libraries(test_bug234 PRIVATE geos)
-add_test(NAME test_bug234 COMMAND test_bug234)
add_executable(test_sweep_line_speed
TestSweepLineSpeed.cpp
diff --git a/tests/bigtest/Makefile.am b/tests/bigtest/Makefile.am
index b06e4e0..bc9eae2 100644
--- a/tests/bigtest/Makefile.am
+++ b/tests/bigtest/Makefile.am
@@ -5,8 +5,7 @@ prefix=@prefix@
top_srcdir=@top_srcdir@
top_builddir=@top_builddir@
-check_PROGRAMS = bug234
-check_PROGRAMS += TestSweepLineSpeed
+check_PROGRAMS = TestSweepLineSpeed
LIBS = $(top_builddir)/src/libgeos.la
# -lmpatrol -lbfd -lintl -liberty -limagehlp
@@ -14,9 +13,6 @@ LIBS = $(top_builddir)/src/libgeos.la
TestSweepLineSpeed_SOURCES = TestSweepLineSpeed.cpp GeometryTestFactory.cpp bigtest.h
TestSweepLineSpeed_LDADD = $(LIBS)
-bug234_SOURCES = bug234.cpp
-bug234_LDADD = $(LIBS)
-
AM_CPPFLAGS = -I$(top_srcdir)/include
EXTRA_DIST = CMakeLists.txt
diff --git a/tests/bigtest/bug234.cpp b/tests/bigtest/bug234.cpp
deleted file mode 100644
index 79b75e8..0000000
--- a/tests/bigtest/bug234.cpp
+++ /dev/null
@@ -1,51 +0,0 @@
-#include <vector>
-
-#include "geos/geom/GeometryFactory.h"
-#include "geos/geom/Geometry.h"
-#include "geos/geom/Coordinate.h"
-#include "geos/geom/CoordinateArraySequence.h"
-#include "geos/geom/LinearRing.h"
-#include "geos/geom/Polygon.h"
-#include "geos/geom/MultiPolygon.h"
-
-using namespace geos::geom;
-using namespace std;
-
-int
-main()
-{
- GeometryFactory::Ptr factory = GeometryFactory::create();
-
- vector< Geometry* >* polys1 = new vector<Geometry*>();
- vector< Geometry* >* polys2 = new vector<Geometry*>();
- vector< Geometry* >* holes1 = new vector<Geometry*>();
-
- CoordinateArraySequence coords1;
- coords1.add(Coordinate(1, 1));
- coords1.add(Coordinate(1, 5));
- coords1.add(Coordinate(5, 5));
- coords1.add(Coordinate(5, 1));
- coords1.add(Coordinate(1, 1));
- holes1->push_back(factory->createLinearRing());
- polys1->push_back(factory->createPolygon(factory->createLinearRing(coords1), holes1));
-
- CoordinateArraySequence coords2;
- coords2.add(Coordinate(3, 3));
- coords2.add(Coordinate(3, 4));
- coords2.add(Coordinate(4, 4));
- coords2.add(Coordinate(4, 3));
- coords2.add(Coordinate(3, 3));
- polys2->push_back(factory->createPolygon(factory->createLinearRing(coords2), new vector<Geometry*>));
-
- MultiPolygon* mpoly1 = factory->createMultiPolygon(polys1);
- MultiPolygon* mpoly2 = factory->createMultiPolygon(polys2);
-
- cout << " Mpoly1: " << mpoly1->toString() << endl;
- cout << " Mpoly2: " << mpoly2->toString() << endl;
- Geometry* intersection = mpoly1->intersection(mpoly2);
- cout << "Intersection: " << intersection->toString() << endl;
-
- delete mpoly1;
- delete mpoly2;
- delete intersection;
-}
diff --git a/tests/xmltester/Makefile.am b/tests/xmltester/Makefile.am
index ff96f47..81e727f 100644
--- a/tests/xmltester/Makefile.am
+++ b/tests/xmltester/Makefile.am
@@ -82,6 +82,7 @@ SAFE_XMLTESTS= \
$(srcdir)/tests/robust/TestRobustRelate.xml \
$(srcdir)/tests/issue/issue-geos-176.xml \
$(srcdir)/tests/issue/issue-geos-188.xml \
+ $(srcdir)/tests/issue/issue-geos-234.xml \
$(srcdir)/tests/issue/issue-geos-244.xml \
$(srcdir)/tests/issue/issue-geos-275.xml \
$(srcdir)/tests/issue/issue-geos-350.xml \
diff --git a/tests/xmltester/tests/issue/issue-geos-234.xml b/tests/xmltester/tests/issue/issue-geos-234.xml
new file mode 100644
index 0000000..ad25099
--- /dev/null
+++ b/tests/xmltester/tests/issue/issue-geos-234.xml
@@ -0,0 +1,26 @@
+<run>
+ <desc>
+http://trac.osgeo.org/geos/ticket/234
+ </desc>
+ <precisionModel type="FLOATING" />
+
+<case>
+ <desc>
+http://trac.osgeo.org/geos/ticket/234
+Assertion failed on intersecting collection with empty component
+ </desc>
+ <a>
+MULTIPOLYGON (((1 1, 1 5, 5 5, 5 1, 1 1), EMPTY))
+ </a>
+ <b>
+MULTIPOLYGON (((3 3, 3 4, 4 4, 4 3, 3 3)))
+ </b>
+<test>
+ <op name="intersection" arg1="A" arg2="B">
+POLYGON ((3 3, 3 4, 4 4, 4 3, 3 3))
+ </op>
+</test>
+</case>
+
+
+</run>
-----------------------------------------------------------------------
Summary of changes:
tests/bigtest/CMakeLists.txt | 3 --
tests/bigtest/Makefile.am | 6 +--
tests/bigtest/bug234.cpp | 51 --------------------------
tests/xmltester/Makefile.am | 1 +
tests/xmltester/tests/issue/issue-geos-234.xml | 26 +++++++++++++
5 files changed, 28 insertions(+), 59 deletions(-)
delete mode 100644 tests/bigtest/bug234.cpp
create mode 100644 tests/xmltester/tests/issue/issue-geos-234.xml
hooks/post-receive
--
GEOS
More information about the geos-commits
mailing list