PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ test_misc_wkb()

static void test_misc_wkb ( void  )
static

Definition at line 110 of file liblwgeom/cunit/cu_misc.c.

References LW_PARSER_CHECK_ALL, lwfree(), lwgeom_free(), lwgeom_from_hexwkb(), lwgeom_to_wkt(), and WKB_ISO.

Referenced by misc_suite_setup().

111 {
112  static char *wkb = "010A0000000200000001080000000700000000000000000000C00000000000000000000000000000F0BF000000000000F0BF00000000000000000000000000000000000000000000F03F000000000000F0BF000000000000004000000000000000000000000000000000000000000000004000000000000000C00000000000000000010200000005000000000000000000F0BF00000000000000000000000000000000000000000000E03F000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F0BF0000000000000000";
114  char *str = lwgeom_to_wkt(geom, WKB_ISO, 8, 0);
115  CU_ASSERT_STRING_EQUAL(str, "CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))");
116  lwfree(str);
117  lwgeom_free(geom);
118 
119 }
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.
Definition: lwout_wkt.c:675
void lwfree(void *mem)
Definition: lwutil.c:244
void lwgeom_free(LWGEOM *geom)
Definition: lwgeom.c:1144
#define WKB_ISO
Definition: liblwgeom.h:2065
LWGEOM * lwgeom_from_hexwkb(const char *hexwkb, const char check)
Definition: lwin_wkb.c:789
#define LW_PARSER_CHECK_ALL
Definition: liblwgeom.h:2005
Here is the call graph for this function:
Here is the caller graph for this function: