PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void test_gbox_serialized_size ( void  )

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

228 {
229  uint8_t flags = gflags(0, 0, 0);
230  CU_ASSERT_EQUAL(gbox_serialized_size(flags),16);
231  FLAGS_SET_BBOX(flags, 1);
232  CU_ASSERT_EQUAL(gbox_serialized_size(flags),16);
233  FLAGS_SET_Z(flags, 1);
234  CU_ASSERT_EQUAL(gbox_serialized_size(flags),24);
235  FLAGS_SET_M(flags, 1);
236  CU_ASSERT_EQUAL(gbox_serialized_size(flags),32);
237  FLAGS_SET_GEODETIC(flags, 1);
238  CU_ASSERT_EQUAL(gbox_serialized_size(flags),24);
240 }
#define FLAGS_SET_GEODETIC(flags, value)
Definition: liblwgeom.h:115
#define FLAGS_SET_Z(flags, value)
Definition: liblwgeom.h:112
uint8_t gflags(int hasz, int hasm, int geodetic)
Construct a new flags char.
Definition: g_util.c:131
#define FLAGS_SET_BBOX(flags, value)
Definition: liblwgeom.h:114
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:375
#define FLAGS_SET_M(flags, value)
Definition: liblwgeom.h:113

Here is the call graph for this function:

Here is the caller graph for this function: