PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void test_wkt_in_linestring ( void  )
static

Definition at line 92 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().

93 {
94  s = "LINESTRING EMPTY";
95  r = cu_wkt_in(s, WKT_SFSQL);
96  CU_ASSERT_STRING_EQUAL(r,s);
97  lwfree(r);
98 
99  s = "LINESTRING(0 0,1 1)";
100  r = cu_wkt_in(s, WKT_SFSQL);
101  CU_ASSERT_STRING_EQUAL(r,s);
102  lwfree(r);
103 
104  s = "LINESTRING(0 0 0,1 1 1)";
106  CU_ASSERT_STRING_EQUAL(r,s);
107  lwfree(r);
108 
109  s = "LINESTRING M (0 0 0,1 1 1)";
110  r = cu_wkt_in(s, WKT_ISO);
111  CU_ASSERT_STRING_EQUAL(r,s);
112  lwfree(r);
113 
114  s = "LINESTRING ZM (0 0 0 1,1 1 1 1,2 2 2 2,0.141231 4 5 4)";
115  r = cu_wkt_in(s, WKT_ISO);
116  CU_ASSERT_STRING_EQUAL(r,s);
117  lwfree(r);
118 
119  s = "LINESTRINGM(0 0 0,1 1 1)";
121  CU_ASSERT_STRING_EQUAL(r,s);
122  lwfree(r);
123 
124  s = "LINESTRING ZM EMPTY";
125  r = cu_wkt_in(s, WKT_ISO);
126  CU_ASSERT_STRING_EQUAL(r,s);
127  lwfree(r);
128 
129  s = "LINESTRING Z (0 0 0 1, 0 1 0 1)";
131  CU_ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry");
132  //printf("\nIN: %s\nOUT: %s\n",s,r);
133  lwfree(r);
134 
135 }
char * r
Definition: cu_in_wkt.c:25
void lwfree(void *mem)
Definition: lwutil.c:190
#define WKT_ISO
Definition: liblwgeom.h:1776
char * s
Definition: cu_in_wkt.c:24
#define WKT_EXTENDED
Definition: liblwgeom.h:1778
#define WKT_SFSQL
Definition: liblwgeom.h:1777
static char * cu_wkt_in(char *wkt, uint8_t variant)
Definition: cu_in_wkt.c:51

Here is the call graph for this function:

Here is the caller graph for this function: