PostGIS  2.5.0beta2dev-r@@SVN_REVISION@@

◆ do_test_s64_roundtrip()

static void do_test_s64_roundtrip ( int64_t  i64_in)
static

Definition at line 188 of file cu_varint.c.

References buffer(), varint_s64_decode(), and varint_s64_encode_buf().

Referenced by test_varint_roundtrip().

189 {
190  uint8_t buffer[16];
191  int64_t i64_out;
192  size_t size_in, size_out;
193  size_in = varint_s64_encode_buf(i64_in, buffer);
194  i64_out = varint_s64_decode(buffer, buffer + size_in, &size_out);
195  CU_ASSERT_EQUAL(i64_in, i64_out);
196  CU_ASSERT_EQUAL(size_in, size_out);
197 }
int64_t varint_s64_decode(const uint8_t *the_start, const uint8_t *the_end, size_t *size)
Definition: varint.c:102
Datum buffer(PG_FUNCTION_ARGS)
size_t varint_s64_encode_buf(int64_t val, uint8_t *buf)
Definition: varint.c:89
unsigned char uint8_t
Definition: uthash.h:79
Here is the call graph for this function:
Here is the caller graph for this function: