PostGIS  2.4.9dev-r@@SVN_REVISION@@

◆ test_wkt_in_errlocation()

static void test_wkt_in_errlocation ( void  )
static

Definition at line 335 of file cu_in_wkt.c.

References struct_lwgeom_parser_result::errlocation, LW_FAILURE, LW_PARSER_CHECK_ALL, lwgeom_parse_wkt(), lwgeom_parser_result_free(), lwgeom_parser_result_init(), and wkt_in_suite_setup().

Referenced by wkt_in_suite_setup().

336 {
338  int rv = 0;
339  char *wkt = 0;
340 
341  wkt = "LINESTRING((0 0 0,1 1)";
343  rv = lwgeom_parse_wkt(&p, wkt, LW_PARSER_CHECK_ALL);
344  CU_ASSERT_EQUAL( rv, LW_FAILURE );
345  CU_ASSERT((12 - p.errlocation) < 1.5);
346 
347 // printf("errlocation %d\n", p.errlocation);
348 // printf("message %s\n", p.message);
349 
351 
352 }
void lwgeom_parser_result_free(LWGEOM_PARSER_RESULT *parser_result)
Definition: lwin_wkt.c:885
#define LW_FAILURE
Definition: liblwgeom.h:79
int lwgeom_parse_wkt(LWGEOM_PARSER_RESULT *parser_result, char *wktstr, int parse_flags)
Parse a WKT geometry string into an LWGEOM structure.
Parser result structure: returns the result of attempting to convert (E)WKT/(E)WKB to LWGEOM...
Definition: liblwgeom.h:2020
void lwgeom_parser_result_init(LWGEOM_PARSER_RESULT *parser_result)
Definition: lwin_wkt.c:879
#define LW_PARSER_CHECK_ALL
Definition: liblwgeom.h:2014
Here is the call graph for this function:
Here is the caller graph for this function: