22{
24 char * h = NULL;
25 char * srs = NULL;
26 size_t size;
27
29 if ( ! g )
30 {
31 fprintf(stderr,
"\nIn: %s\nExp: %s\nObt: %s\n", in, exp,
cu_error_msg);
32 CU_ASSERT(g != NULL);
33 return;
34 }
35
37
38 if (strcmp(h, exp))
39 {
40 fprintf(stderr, "\nIn: %s\nExp: %s\nObt: %s\n", in, exp, h);
41 CU_ASSERT_STRING_EQUAL(h, exp);
42 }
43
44 if ( exp_srs )
45 {
46 if ( ! srs )
47 {
48 fprintf(stderr, "\nIn: %s\nExp: %s\nObt: (null)\n", in, exp_srs);
49 CU_ASSERT_EQUAL(srs, exp_srs);
50 }
51 else if (strcmp(srs, exp_srs))
52 {
53 fprintf(stderr, "\nIn: %s\nExp: %s\nObt: %s\n", in, exp_srs, srs);
54 CU_ASSERT_STRING_EQUAL(srs, exp_srs);
55 }
56 }
57 else if ( srs )
58 {
59 fprintf(stderr, "\nIn: %s\nExp: (null)\nObt: %s\n", in, srs);
60 CU_ASSERT_EQUAL(srs, exp_srs);
61 }
62
66}
char cu_error_msg[MAX_CUNIT_ERROR_LENGTH+1]
void lwgeom_free(LWGEOM *geom)
char * lwgeom_to_wkt(const LWGEOM *geom, uint8_t variant, int precision, size_t *size_out)
WKT emitter function.
LWGEOM * lwgeom_from_geojson(const char *geojson, char **srs)
Create an LWGEOM object from a GeoJSON representation.