PostGIS  2.5.2dev-r@@SVN_REVISION@@

◆ do_fn_test()

void do_fn_test ( LWGEOM *(*)(LWGEOM *)  transfn,
char *  input_wkt,
char *  expected_wkt 
)

Definition at line 313 of file liblwgeom/cunit/cu_tester.c.

References ASSERT_LWGEOM_EQUAL, LW_PARSER_CHECK_NONE, lwgeom_free(), and lwgeom_from_wkt().

Referenced by test_lwmpoint_from_lwgeom().

314 {
315  LWGEOM* input = lwgeom_from_wkt(input_wkt, LW_PARSER_CHECK_NONE);
316  LWGEOM* expected = lwgeom_from_wkt(expected_wkt, LW_PARSER_CHECK_NONE);
317  LWGEOM* observed = transfn(input);
318 
319  ASSERT_LWGEOM_EQUAL(observed, expected);
320 
321  lwgeom_free(input);
322  lwgeom_free(expected);
323  lwgeom_free(observed);
324 }
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
LWGEOM * lwgeom_from_wkt(const char *wkt, const char check)
Definition: lwin_wkt.c:904
#define LW_PARSER_CHECK_NONE
Definition: liblwgeom.h:2004
#define ASSERT_LWGEOM_EQUAL(o, e)
Here is the call graph for this function:
Here is the caller graph for this function: