]> granicus.if.org Git - postgis/commitdiff
Add cunit-level test for #2412
authorSandro Santilli <strk@keybit.net>
Sun, 11 Aug 2013 09:07:11 +0000 (09:07 +0000)
committerSandro Santilli <strk@keybit.net>
Sun, 11 Aug 2013 09:07:11 +0000 (09:07 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@11768 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/cunit/cu_ptarray.c

index 3bd744971c2684ea2820add79a78784f9c016f0e..aec35740f638f038ceeeec52d771e1d155cb2646 100644 (file)
@@ -405,6 +405,15 @@ static void test_ptarray_desegmentize()
 //     printf("%s\n", str);
        lwfree(str);            
        
+  // See http://trac.osgeo.org/postgis/ticket/2412
+       in = lwgeom_from_text("LINESTRING(0 0, 1 1)");
+       out = lwgeom_desegmentize(in);
+       str = lwgeom_to_wkt(out, WKT_ISO, 8, NULL);
+//printf("%s\n", str);
+       CU_ASSERT_STRING_EQUAL(str, "LINESTRING(0 0,1 1)");
+       lwgeom_free(in);
+       lwgeom_free(out);
+       lwfree(str);            
 }
 
 static void test_ptarray_contains_point()