PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ test_wkt_in_point()

static void test_wkt_in_point ( void  )
static

Definition at line 68 of file cu_in_wkt.c.

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

Referenced by wkt_in_suite_setup().

69 {
70  s = "POINT(1 2) foobar";
71  r = cu_wkt_in(s, WKT_SFSQL);
72  CU_ASSERT_STRING_EQUAL("parse error - invalid geometry", r);
73  lwfree(r);
74 
75  s = "POINT(1e700 0)";
76  r = cu_wkt_in(s, WKT_SFSQL);
77  CU_TEST ( ! strcmp(r, "POINT(inf 0)") || ! strcmp(r, "POINT(1.#INF 0)") || ! strcmp(r, "POINT(Infinity 0)") );
78  lwfree(r);
79 
80  s = "POINT(0 0)";
81  r = cu_wkt_in(s, WKT_SFSQL);
82  CU_ASSERT_STRING_EQUAL(r,s);
83  lwfree(r);
84 
85  s = "POINT EMPTY";
86  r = cu_wkt_in(s, WKT_SFSQL);
87  CU_ASSERT_STRING_EQUAL(r,s);
88  lwfree(r);
89 
90  s = "POINT M EMPTY";
91  r = cu_wkt_in(s, WKT_ISO);
92  CU_ASSERT_STRING_EQUAL(r,s);
93  lwfree(r);
94 
95  //printf("\nIN: %s\nOUT: %s\n",s,r);
96 }
char * r
Definition: cu_in_wkt.c:24
void lwfree(void *mem)
Definition: lwutil.c:244
#define WKT_ISO
Definition: liblwgeom.h:2083
char * s
Definition: cu_in_wkt.c:23
#define WKT_SFSQL
Definition: liblwgeom.h:2084
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: