PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_wkt_double()

static void test_wkt_double ( void  )
static

Definition at line 354 of file cu_in_wkt.c.

355 {
357  int rv = 0;
358  char *wkt = 0;
359 
360  wkt = "LINESTRING(1.1.1, 2.2.2)";
362  rv = lwgeom_parse_wkt(&p, wkt, LW_PARSER_CHECK_ALL);
363  CU_ASSERT_EQUAL( rv, LW_FAILURE );
365 
366  wkt = "LINESTRING(1.1 .1, 2.2 .2)";
368  rv = lwgeom_parse_wkt(&p, wkt, LW_PARSER_CHECK_ALL);
369  CU_ASSERT_EQUAL( rv, LW_SUCCESS );
371 
372  wkt = "LINESTRING( 1.1 .1 , 2.2 .2 )";
374  rv = lwgeom_parse_wkt(&p, wkt, LW_PARSER_CHECK_ALL);
375  CU_ASSERT_EQUAL( rv, LW_SUCCESS );
377 
378  wkt = "LINESTRING(\n1.1\n.1,\n2.2\n.2\n)";
380  rv = lwgeom_parse_wkt(&p, wkt, LW_PARSER_CHECK_ALL);
381  CU_ASSERT_EQUAL( rv, LW_SUCCESS );
383 
384  wkt = "LINESTRING(1.1\t.1\t,\t2.2\t.2\t)";
386  rv = lwgeom_parse_wkt(&p, wkt, LW_PARSER_CHECK_ALL);
387  CU_ASSERT_EQUAL( rv, LW_SUCCESS );
389 }
#define LW_PARSER_CHECK_ALL
Definition: liblwgeom.h:2006
#define LW_FAILURE
Definition: liblwgeom.h:79
#define LW_SUCCESS
Definition: liblwgeom.h:80
void lwgeom_parser_result_init(LWGEOM_PARSER_RESULT *parser_result)
Definition: lwin_wkt.c:879
int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int parse_flags)
Parse a WKT geometry string into an LWGEOM structure.
void lwgeom_parser_result_free(LWGEOM_PARSER_RESULT *parser_result)
Definition: lwin_wkt.c:885
Parser result structure: returns the result of attempting to convert (E)WKT/(E)WKB to LWGEOM.
Definition: liblwgeom.h:2013

References LW_FAILURE, LW_PARSER_CHECK_ALL, LW_SUCCESS, lwgeom_parse_wkt(), lwgeom_parser_result_free(), and lwgeom_parser_result_init().

Referenced by wkt_in_suite_setup().

Here is the call graph for this function:
Here is the caller graph for this function: