PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ test_gbox_to_string_truncated()

static void test_gbox_to_string_truncated ( void  )
static

Definition at line 1572 of file cu_geodetic.c.

References ASSERT_STRING_EQUAL, GBOX::flags, FLAGS_SET_M, FLAGS_SET_Z, gbox_to_string(), geodetic_suite_setup(), and lwfree().

Referenced by geodetic_suite_setup().

1573 {
1574  GBOX g = {
1575  .flags = 0,
1576  .xmin = -DBL_MAX,
1577  .xmax = -DBL_MAX,
1578  .ymin = -DBL_MAX,
1579  .ymax = -DBL_MAX,
1580  .zmin = -DBL_MAX,
1581  .zmax = -DBL_MAX,
1582  .mmin = -DBL_MAX,
1583  .mmax = -DBL_MAX,
1584  };
1585  FLAGS_SET_Z(g.flags, 1);
1586  FLAGS_SET_M(g.flags, 1);
1587  char *c = gbox_to_string(&g);
1588 
1589  ASSERT_STRING_EQUAL(c, "GBOX((-1.7976931e+308,-1.7976931e+308,-1.7976931e+308,-1.7976931e+308),(-1.7976931e+308,-1.7976931e+308,-1.7976931e+308,-1.7976931e+308))");
1590 
1591  lwfree(c);
1592 }
void lwfree(void *mem)
Definition: lwutil.c:242
char * gbox_to_string(const GBOX *gbox)
Allocate a string representation of the GBOX, based on dimensionality of flags.
Definition: g_box.c:404
#define ASSERT_STRING_EQUAL(o, e)
#define FLAGS_SET_Z(flags, value)
Definition: liblwgeom.h:145
uint8_t flags
Definition: liblwgeom.h:290
#define FLAGS_SET_M(flags, value)
Definition: liblwgeom.h:146
Here is the call graph for this function:
Here is the caller graph for this function: