PostGIS 3.0.6dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ ASSERT_LWGEOM_EQUAL

#define ASSERT_LWGEOM_EQUAL (   o,
 
)
Value:
do { \
if ( !lwgeom_same(o, e) ) { \
char* wkt_o = lwgeom_to_ewkt(o); \
char* wkt_e = lwgeom_to_ewkt(e); \
fprintf(stderr, "[%s:%d]\n Expected: %s\n Obtained: %s\n", __FILE__, __LINE__, (wkt_o), (wkt_e)); \
lwfree(wkt_o); \
lwfree(wkt_e); \
} \
CU_ASSERT_TRUE(lwgeom_same(o, e)); \
} while(0);
char lwgeom_same(const LWGEOM *lwgeom1, const LWGEOM *lwgeom2)
geom1 same as geom2 iff
Definition lwgeom.c:573
char * lwgeom_to_ewkt(const LWGEOM *lwgeom)
Return an alloced string.
Definition lwgeom.c:547

Definition at line 49 of file liblwgeom/cunit/cu_tester.h.

49 { \
50 if ( !lwgeom_same(o, e) ) { \
51 char* wkt_o = lwgeom_to_ewkt(o); \
52 char* wkt_e = lwgeom_to_ewkt(e); \
53 fprintf(stderr, "[%s:%d]\n Expected: %s\n Obtained: %s\n", __FILE__, __LINE__, (wkt_o), (wkt_e)); \
54 lwfree(wkt_o); \
55 lwfree(wkt_e); \
56 } \
57 CU_ASSERT_TRUE(lwgeom_same(o, e)); \
58} while(0);