]> granicus.if.org Git - postgis/commitdiff
Add another test for ptarray_isccw, which incredibly seems to disagree with the same...
authorSandro Santilli <strk@keybit.net>
Sun, 20 Nov 2011 21:35:18 +0000 (21:35 +0000)
committerSandro Santilli <strk@keybit.net>
Sun, 20 Nov 2011 21:35:18 +0000 (21:35 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@8194 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/cunit/cu_ptarray.c

index b0139e11e12137a0befcf45b5402293dd2a34995..8b6029f88270b950620e5f55211c4befe010a111 100644 (file)
@@ -137,6 +137,12 @@ static void test_ptarray_isccw(void)
        ccw = ptarray_isccw(line->points);
        CU_ASSERT_EQUAL(ccw, 1);
        lwline_free(line);
+
+       /* clockwise narrow ring (see ticket #1302) */
+       line = lwgeom_as_lwline(lwgeom_from_hexwkb("01020000000500000000917E9BA468294100917E9B8AEA2841C976BE1FA4682941C976BE9F8AEA2841B39ABE1FA46829415ACCC29F8AEA284137894120A4682941C976BE9F8AEA284100917E9BA468294100917E9B8AEA2841", LW_PARSER_CHECK_NONE));
+       ccw = ptarray_isccw(line->points);
+       CU_ASSERT_EQUAL(ccw, 0);
+       lwline_free(line);
 }