PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_pixtype_size()

static void test_pixtype_size ( )
static

Definition at line 27 of file cu_pixtype.c.

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 }
@ PT_32BUI
Definition: librtcore.h:194
@ PT_2BUI
Definition: librtcore.h:187
@ PT_32BSI
Definition: librtcore.h:193
@ PT_END
Definition: librtcore.h:197
@ PT_4BUI
Definition: librtcore.h:188
@ PT_32BF
Definition: librtcore.h:195
@ PT_1BB
Definition: librtcore.h:186
@ PT_16BUI
Definition: librtcore.h:192
@ PT_8BSI
Definition: librtcore.h:189
@ PT_16BSI
Definition: librtcore.h:191
@ PT_64BF
Definition: librtcore.h:196
@ PT_8BUI
Definition: librtcore.h:190
int rt_pixtype_size(rt_pixtype pixtype)
Return size in bytes of a value in the given pixtype.
Definition: rt_pixel.c:39

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().

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