From 8ff256bab6d9d558bb8e873dbf9c01f65bf184d0 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Thu, 26 Jan 2012 12:59:43 +0000 Subject: [PATCH] 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 --- liblwgeom/cunit/cu_ptarray.c | 8 ++++++++ 1 file changed, 8 insertions(+) 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) -- 2.40.0