PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ do_test_u64_roundtrip()

static void do_test_u64_roundtrip ( uint64_t  i64_in)
static

Definition at line 177 of file cu_varint.c.

178 {
179  uint8_t buffer[16];
180  uint64_t i64_out;
181  size_t size_in, size_out;
182  size_in = varint_u64_encode_buf(i64_in, buffer);
183  i64_out = varint_u64_decode(buffer, buffer + size_in, &size_out);
184  CU_ASSERT_EQUAL(i64_in, i64_out);
185  CU_ASSERT_EQUAL(size_in, size_out);
186 }
Datum buffer(PG_FUNCTION_ARGS)
unsigned char uint8_t
Definition: uthash.h:79
size_t varint_u64_encode_buf(uint64_t val, uint8_t *buf)
Definition: varint.c:76
uint64_t varint_u64_decode(const uint8_t *the_start, const uint8_t *the_end, size_t *size)
Definition: varint.c:109

References buffer(), varint_u64_decode(), and varint_u64_encode_buf().

Referenced by test_varint_roundtrip().

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