PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches

◆ do_test_u64_varint()

static void do_test_u64_varint ( uint64_t  nr,
int  expected_size,
char *  expected_res 
)
static

Definition at line 69 of file cu_varint.c.

70{
71 uint8_t buf[16];
72 int size;
73 char *hex;
74
75 size = varint_u64_encode_buf(nr, buf);
76 if ( size != expected_size )
77 {
78 printf("Expected: %d\nObtained: %d\n", expected_size, size);
79 }
80 CU_ASSERT_EQUAL(size,expected_size);
81
82 hex = hexbytes_from_bytes(buf,size);
83 ASSERT_STRING_EQUAL(hex, expected_res);
84 lwfree(hex);
85}
#define ASSERT_STRING_EQUAL(o, e)
char * hexbytes_from_bytes(const uint8_t *bytes, size_t size)
Definition lwout_wkb.c:40
void lwfree(void *mem)
Definition lwutil.c:248
size_t varint_u64_encode_buf(uint64_t val, uint8_t *buf)
Definition varint.c:76

References ASSERT_STRING_EQUAL, hexbytes_from_bytes(), lwfree(), and varint_u64_encode_buf().

Referenced by test_varint().

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