PostGIS  2.2.8dev-r@@SVN_REVISION@@

◆ test_gbox_serialized_size()

static void test_gbox_serialized_size ( void  )

Definition at line 236 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().

237 {
238  uint8_t flags = gflags(0, 0, 0);
239  CU_ASSERT_EQUAL(gbox_serialized_size(flags),16);
240  FLAGS_SET_BBOX(flags, 1);
241  CU_ASSERT_EQUAL(gbox_serialized_size(flags),16);
242  FLAGS_SET_Z(flags, 1);
243  CU_ASSERT_EQUAL(gbox_serialized_size(flags),24);
244  FLAGS_SET_M(flags, 1);
245  CU_ASSERT_EQUAL(gbox_serialized_size(flags),32);
246  FLAGS_SET_GEODETIC(flags, 1);
247  CU_ASSERT_EQUAL(gbox_serialized_size(flags),24);
249 }
#define FLAGS_SET_GEODETIC(flags, value)
Definition: liblwgeom.h:133
#define FLAGS_SET_Z(flags, value)
Definition: liblwgeom.h:130
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
Definition: g_util.c:130
#define FLAGS_SET_BBOX(flags, value)
Definition: liblwgeom.h:132
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:416
#define FLAGS_SET_M(flags, value)
Definition: liblwgeom.h:131
Here is the call graph for this function:
Here is the caller graph for this function: