PostGIS  3.0.6dev-r@@SVN_REVISION@@

◆ test_wkt_in_errlocation()

static void test_wkt_in_errlocation ( void  )
static

Definition at line 337 of file cu_in_wkt.c.

338 {
340  int rv = 0;
341  char *wkt = 0;
342 
343  wkt = "LINESTRING((0 0 0,1 1)";
345  rv = lwgeom_parse_wkt(&p, wkt, LW_PARSER_CHECK_ALL);
346  CU_ASSERT_EQUAL( rv, LW_FAILURE );
347  CU_ASSERT((12 - p.errlocation) < 1.5);
348 
349 // printf("errlocation %d\n", p.errlocation);
350 // printf("message %s\n", p.message);
351 
353 
354 }
#define LW_PARSER_CHECK_ALL
Definition: liblwgeom.h:2061
#define LW_FAILURE
Definition: liblwgeom.h:110
void lwgeom_parser_result_init(LWGEOM_PARSER_RESULT *parser_result)
Definition: lwin_wkt.c:880
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:886
Parser result structure: returns the result of attempting to convert (E)WKT/(E)WKB to LWGEOM.
Definition: liblwgeom.h:2068

References struct_lwgeom_parser_result::errlocation, LW_FAILURE, LW_PARSER_CHECK_ALL, 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: