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

◆ test_gbox_serialized_size()

static void test_gbox_serialized_size ( void  )
static

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

260{
261 lwflags_t flags = lwflags(0, 0, 0);
262 CU_ASSERT_EQUAL(gbox_serialized_size(flags),16);
263 FLAGS_SET_BBOX(flags, 1);
264 CU_ASSERT_EQUAL(gbox_serialized_size(flags),16);
265 FLAGS_SET_Z(flags, 1);
266 CU_ASSERT_EQUAL(gbox_serialized_size(flags),24);
267 FLAGS_SET_M(flags, 1);
268 CU_ASSERT_EQUAL(gbox_serialized_size(flags),32);
269 FLAGS_SET_GEODETIC(flags, 1);
270 CU_ASSERT_EQUAL(gbox_serialized_size(flags),24);
271}
size_t gbox_serialized_size(lwflags_t flags)
Return the number of bytes necessary to hold a GBOX of this dimension in serialized form.
Definition gbox.c:452
uint16_t lwflags_t
Definition liblwgeom.h:299
#define FLAGS_SET_BBOX(flags, value)
Definition liblwgeom.h:174
#define FLAGS_SET_GEODETIC(flags, value)
Definition liblwgeom.h:175
lwflags_t lwflags(int hasz, int hasm, int geodetic)
Construct a new flags bitmask.
Definition lwutil.c:477
#define FLAGS_SET_M(flags, value)
Definition liblwgeom.h:173
#define FLAGS_SET_Z(flags, value)
Definition liblwgeom.h:172

References FLAGS_SET_BBOX, FLAGS_SET_GEODETIC, FLAGS_SET_M, FLAGS_SET_Z, gbox_serialized_size(), and lwflags().

Referenced by misc_suite_setup().

Here is the call graph for this function:
Here is the caller graph for this function: