PostGIS 3.7.0dev-r@@SVN_REVISION@@
Loading...
Searching...
No Matches
cu_bytebuffer.c
Go to the documentation of this file.
1/**********************************************************************
2 * $Id$
3 *
4 * PostGIS - Spatial Types for PostgreSQL
5 * http://postgis.net
6 *
7 * Copyright 2012 Sandro Santilli <strk@kbt.io>
8 *
9 * This is free software; you can redistribute and/or modify it under
10 * the terms of the GNU General Public Licence. See the COPYING file.
11 *
12 **********************************************************************/
13
14#include <stdio.h>
15#include <stdlib.h>
16#include <string.h>
17#include "CUnit/Basic.h"
18
19#include "bytebuffer.h"
20#include "cu_tester.h"
21
22#if 0
23
24static void test_bytebuffer_append(void)
25{
26 bytebuffer_t *bb1;
27 int64_t res;
28 bb1 = bytebuffer_create_with_size(2);
29
30 bytebuffer_append_varint(bb1,(int64_t) -12345);
31
32
33 bytebuffer_reset_reading(bb1);
34
35 res= bytebuffer_read_varint(bb1);
36
37 CU_ASSERT_EQUAL(res, -12345);
38
39 bytebuffer_destroy(bb1);
40}
41
42
43/* TODO: add more... */
44
45
46
47/*
48** Used by the test harness to register the tests in this file.
49*/
50void bytebuffer_suite_setup(void);
51void bytebuffer_suite_setup(void)
52{
53 PG_TEST(test_bytebuffer_append),
54 CU_TEST_INFO_NULL
55};
56CU_SuiteInfo bytebuffer_suite = {"bytebuffer", NULL, NULL, bytebuffer_tests };
57
58#endif
void bytebuffer_append_varint(bytebuffer_t *b, const int64_t val)
Writes a signed varInt to the buffer.
Definition bytebuffer.c:154
tuple res
Definition window.py:79