PostGIS  2.3.7dev-r@@SVN_REVISION@@

◆ do_test_u64_roundtrip()

static void do_test_u64_roundtrip ( uint64_t  i64_in)

Definition at line 177 of file cu_varint.c.

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

Referenced by test_varint_roundtrip().

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)
uint64_t varint_u64_decode(const uint8_t *the_start, const uint8_t *the_end, size_t *size)
Definition: varint.c:109
size_t varint_u64_encode_buf(uint64_t val, uint8_t *buf)
Definition: varint.c:76
Here is the call graph for this function:
Here is the caller graph for this function: