PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ test_wkt_in_collection()

static void test_wkt_in_collection ( void  )
static

Definition at line 214 of file cu_in_wkt.c.

References cu_wkt_in(), lwfree(), r, s, WKT_EXTENDED, WKT_ISO, and WKT_SFSQL.

Referenced by wkt_in_suite_setup().

215 {
216  s = "SRID=5;GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(1 0,0 0),CIRCULARSTRING(0 0,0 1,1 1,0 1,2 2))";
218  //printf("\nIN: %s\nOUT: %s\n",s,r);
219  CU_ASSERT_STRING_EQUAL(r,s);
220  lwfree(r);
221 
222  s = "GEOMETRYCOLLECTION(POINT(0 0),POINT EMPTY,LINESTRING(1 0,0 0),POLYGON EMPTY,CIRCULARSTRING(0 0,0 1,1 1,0 1,2 2))";
223  r = cu_wkt_in(s, WKT_SFSQL);
224  //printf("\nIN: %s\nOUT: %s\n",s,r);
225  CU_ASSERT_STRING_EQUAL(r,s);
226  lwfree(r);
227 
228  s = "GEOMETRYCOLLECTION Z (POINT Z (0 0 0))";
229  r = cu_wkt_in(s, WKT_ISO);
230  //printf("\nIN: %s\nOUT: %s\n",s,r);
231  CU_ASSERT_STRING_EQUAL(r,s);
232  lwfree(r);
233 
234  s = "GEOMETRYCOLLECTION M (MULTILINESTRING M ((0 0 5,2 0 5),(1 1 5,2 2 5)))";
235  r = cu_wkt_in(s, WKT_ISO);
236  //printf("\nIN: %s\nOUT: %s\n",s,r);
237  CU_ASSERT_STRING_EQUAL(r,s);
238  lwfree(r);
239 
240  /* See http://trac.osgeo.org/postgis/ticket/1455#comment:3 */
241  s = "GEOMETRYCOLLECTION Z (MULTILINESTRING Z ((0 0 5,2 0 5),(1 1 5,2 2 5)))";
242  r = cu_wkt_in(s, WKT_ISO);
243  //printf("\nIN: %s\nOUT: %s\n",s,r);
244  CU_ASSERT_STRING_EQUAL(r,s);
245  lwfree(r);
246 }
char * r
Definition: cu_in_wkt.c:24
void lwfree(void *mem)
Definition: lwutil.c:242
#define WKT_ISO
Definition: liblwgeom.h:2055
char * s
Definition: cu_in_wkt.c:23
#define WKT_EXTENDED
Definition: liblwgeom.h:2057
#define WKT_SFSQL
Definition: liblwgeom.h:2056
static char * cu_wkt_in(char *wkt, uint8_t variant)
Definition: cu_in_wkt.c:50
Here is the call graph for this function:
Here is the caller graph for this function: