[postgis-tickets] r16038 - Add tests for topology bug #1855

Sandro Santilli strk at kbt.io
Sun Oct 22 08:39:25 PDT 2017


Author: strk
Date: 2017-10-22 08:39:25 -0700 (Sun, 22 Oct 2017)
New Revision: 16038

Modified:
   trunk/topology/test/regress/topogeo_addlinestring.sql
   trunk/topology/test/regress/topogeo_addlinestring_expected
   trunk/topology/test/regress/topogeo_addpolygon.sql
   trunk/topology/test/regress/topogeo_addpolygon_expected
Log:
Add tests for topology bug #1855

Previous commits fixes #1855 too

Modified: trunk/topology/test/regress/topogeo_addlinestring.sql
===================================================================
--- trunk/topology/test/regress/topogeo_addlinestring.sql	2017-10-22 15:39:16 UTC (rev 16037)
+++ trunk/topology/test/regress/topogeo_addlinestring.sql	2017-10-22 15:39:25 UTC (rev 16038)
@@ -350,3 +350,18 @@
 'LINESTRING(622608 6554988, 622596 6554984)'
 ::geometry , 10);
 SELECT 't3838.end', topology.DropTopology('bug3838');
+
+-- See https://trac.osgeo.org/postgis/ticket/1855
+-- Simplified case 1
+SELECT 't1855_1.start', topology.CreateTopology('bug1855') > 0;
+SELECT 't1855_1.0', topology.TopoGeo_addLinestring('bug1855',
+  'LINESTRING(0 0, 10 0, 0 1)', 2);
+SELECT 't1855_1.end', topology.DropTopology('bug1855');
+-- Simplified case 2
+SELECT 't1855_2.start', topology.CreateTopology('bug1855') > 0;
+SELECT 't1855_2.0', topology.topogeo_AddLinestring('bug1855',
+  'LINESTRING(0 0, 0 100)');
+SELECT 't1855_2.1', topology.topogeo_AddLinestring('bug1855',
+  'LINESTRING(10 51, -100 50, 10 49)', 2);
+SELECT 't1855_2.end', topology.DropTopology('bug1855');
+

Modified: trunk/topology/test/regress/topogeo_addlinestring_expected
===================================================================
--- trunk/topology/test/regress/topogeo_addlinestring_expected	2017-10-22 15:39:16 UTC (rev 16037)
+++ trunk/topology/test/regress/topogeo_addlinestring_expected	2017-10-22 15:39:25 UTC (rev 16038)
@@ -222,3 +222,12 @@
 t3838.L2|9
 t3838.L2|2
 t3838.end|Topology 'bug3838' dropped
+t1855_1.start|t
+t1855_1.0|1
+t1855_1.end|Topology 'bug1855' dropped
+t1855_2.start|t
+t1855_2.0|1
+t1855_2.1|3
+t1855_2.1|5
+t1855_2.1|6
+t1855_2.end|Topology 'bug1855' dropped

Modified: trunk/topology/test/regress/topogeo_addpolygon.sql
===================================================================
--- trunk/topology/test/regress/topogeo_addpolygon.sql	2017-10-22 15:39:16 UTC (rev 16037)
+++ trunk/topology/test/regress/topogeo_addpolygon.sql	2017-10-22 15:39:25 UTC (rev 16038)
@@ -111,3 +111,18 @@
 DROP FUNCTION check_changes();
 SELECT DropTopology('city_data');
 
+-- See https://trac.osgeo.org/postgis/ticket/1855
+-- Original submission (more simplifications are
+-- in topogeo_addlinestring.sql)
+-- Original submission
+SELECT 't1855_0.start', topology.CreateTopology('bug1855', 0, 0.00001) > 0;
+SELECT 't1855_0.0', topology.TopoGeo_addPolygon('bug1855',
+        'POLYGON((76.26727 9.85751,76.29001 9.90026,
+                  76.29942 9.86257,76.26727 9.85751))'
+::geometry);
+SELECT 't1855_0.1', topology.TopoGeo_addPolygon('bug1855',
+'POLYGON((76.31988 9.89696,76.30482 9.88391,
+          76.2941 9.88391,76.29409 9.88391,76.29409 9.88392,
+          76.29001 9.90026,76.31988 9.89696))'
+::geometry);
+SELECT 't1855_0.end', topology.DropTopology('bug1855');

Modified: trunk/topology/test/regress/topogeo_addpolygon_expected
===================================================================
--- trunk/topology/test/regress/topogeo_addpolygon_expected	2017-10-22 15:39:16 UTC (rev 16037)
+++ trunk/topology/test/regress/topogeo_addpolygon_expected	2017-10-22 15:39:25 UTC (rev 16038)
@@ -53,3 +53,7 @@
 ex_hole_snap|14
 ex_hole_snap|15
 Topology 'city_data' dropped
+t1855_0.start|t
+t1855_0.0|1
+t1855_0.1|2
+t1855_0.end|Topology 'bug1855' dropped



More information about the postgis-tickets mailing list