PostGIS  2.5.0dev-r@@SVN_REVISION@@

◆ test_gbox_serialized_size()

static void test_gbox_serialized_size ( void  )
static

Definition at line 237 of file cu_libgeom.c.

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

Referenced by libgeom_suite_setup().

238 {
239  uint8_t flags = gflags(0, 0, 0);
240  CU_ASSERT_EQUAL(gbox_serialized_size(flags),16);
241  FLAGS_SET_BBOX(flags, 1);
242  CU_ASSERT_EQUAL(gbox_serialized_size(flags),16);
243  FLAGS_SET_Z(flags, 1);
244  CU_ASSERT_EQUAL(gbox_serialized_size(flags),24);
245  FLAGS_SET_M(flags, 1);
246  CU_ASSERT_EQUAL(gbox_serialized_size(flags),32);
247  FLAGS_SET_GEODETIC(flags, 1);
248  CU_ASSERT_EQUAL(gbox_serialized_size(flags),24);
249 
250 }
#define FLAGS_SET_GEODETIC(flags, value)
Definition: liblwgeom.h:148
#define FLAGS_SET_Z(flags, value)
Definition: liblwgeom.h:145
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
Definition: g_util.c:145
#define FLAGS_SET_BBOX(flags, value)
Definition: liblwgeom.h:147
unsigned char uint8_t
Definition: uthash.h:79
size_t gbox_serialized_size(uint8_t flags)
Return the number of bytes necessary to hold a GBOX of this dimension in serialized form...
Definition: g_box.c:446
#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: