From: Sandro Santilli Date: Thu, 26 Jan 2012 12:59:43 +0000 (+0000) Subject: Test that mixed dimensionality is not allowed by ptarray_append_ptarray X-Git-Tag: 2.0.0alpha3~67 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8ff256bab6d9d558bb8e873dbf9c01f65bf184d0;p=postgis Test that mixed dimensionality is not allowed by ptarray_append_ptarray git-svn-id: http://svn.osgeo.org/postgis/trunk@8928 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/cunit/cu_ptarray.c b/liblwgeom/cunit/cu_ptarray.c index 50e518b0a..26e9bf604 100644 --- a/liblwgeom/cunit/cu_ptarray.c +++ b/liblwgeom/cunit/cu_ptarray.c @@ -137,6 +137,14 @@ static void test_ptarray_append_ptarray(void) lwline_free(line2); lwline_free(line1); + /* Mixed dimensionality is not allowed */ + line1 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(0 10 0, 10 0 0)")); + line2 = lwgeom_as_lwline(lwgeom_from_text("LINESTRING(10 0,11 0)")); + ret = ptarray_append_ptarray(line1->points, line2->points, -1); + CU_ASSERT(ret == LW_FAILURE); + lwline_free(line2); + lwline_free(line1); + } static void test_ptarray_locate_point(void)