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

Definition at line 329 of file cu_in_wkt.c.

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

Referenced by wkt_in_suite_setup().

330 {
332  int rv = 0;
333  char *wkt = 0;
334 
335  wkt = "LINESTRING((0 0 0,1 1)";
337  rv = lwgeom_parse_wkt(&p, wkt, LW_PARSER_CHECK_ALL);
338  if ( fabs(12 - p.errlocation) >= 1.5 ) {
339  printf("Unexpected errlocation: %d\n", p.errlocation);
340  printf(" message: %s\n", p.message);
341  }
342  CU_ASSERT(fabs(12 - p.errlocation) < 1.5);
343 
344 
346 
347 }
void lwgeom_parser_result_free(LWGEOM_PARSER_RESULT *parser_result)
Definition: lwin_wkt.c:825
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:1713
void lwgeom_parser_result_init(LWGEOM_PARSER_RESULT *parser_result)
Definition: lwin_wkt.c:819
#define LW_PARSER_CHECK_ALL
Definition: liblwgeom.h:1707

Here is the call graph for this function:

Here is the caller graph for this function: