PostGIS  2.3.8dev-r@@SVN_REVISION@@

◆ test_pixtype_size()

static void test_pixtype_size ( )
static

Definition at line 27 of file cu_pixtype.c.

References PT_16BSI, PT_16BUI, PT_1BB, PT_2BUI, PT_32BF, PT_32BSI, PT_32BUI, PT_4BUI, PT_64BF, PT_8BSI, PT_8BUI, PT_END, and rt_pixtype_size().

Referenced by pixtype_suite_setup().

27  {
28  CU_ASSERT_EQUAL(rt_pixtype_size(PT_1BB), 1);
29  CU_ASSERT_EQUAL(rt_pixtype_size(PT_2BUI), 1);
30  CU_ASSERT_EQUAL(rt_pixtype_size(PT_4BUI), 1);
31  CU_ASSERT_EQUAL(rt_pixtype_size(PT_8BUI), 1);
32  CU_ASSERT_EQUAL(rt_pixtype_size(PT_8BSI), 1);
33  CU_ASSERT_EQUAL(rt_pixtype_size(PT_16BUI), 2);
34  CU_ASSERT_EQUAL(rt_pixtype_size(PT_16BSI), 2);
35  CU_ASSERT_EQUAL(rt_pixtype_size(PT_32BUI), 4);
36  CU_ASSERT_EQUAL(rt_pixtype_size(PT_32BSI), 4);
37  CU_ASSERT_EQUAL(rt_pixtype_size(PT_32BF), 4);
38  CU_ASSERT_EQUAL(rt_pixtype_size(PT_64BF), 8);
39 
40  CU_ASSERT_EQUAL(rt_pixtype_size(PT_END), -1);
41 }
int rt_pixtype_size(rt_pixtype pixtype)
Return size in bytes of a value in the given pixtype.
Definition: rt_pixel.c:39
Here is the call graph for this function:
Here is the caller graph for this function: