PostGIS  2.1.10dev-r@@SVN_REVISION@@
static void test_stringbuffer_append ( void  )
static

Definition at line 23 of file cu_stringbuffer.c.

References stringbuffer_append(), stringbuffer_create_with_size(), stringbuffer_destroy(), and stringbuffer_getstring().

Referenced by stringbuffer_suite_setup().

24 {
25  stringbuffer_t *sb;
26  const char *str;
27 
29  stringbuffer_append(sb, "hello world");
30  str = stringbuffer_getstring(sb);
31 
32  CU_ASSERT_STRING_EQUAL("hello world", str);
33 
35 }
stringbuffer_t * stringbuffer_create_with_size(size_t size)
Allocate a new stringbuffer_t.
Definition: stringbuffer.c:56
void stringbuffer_append(stringbuffer_t *s, const char *a)
Append the specified string to the stringbuffer_t.
Definition: stringbuffer.c:128
void stringbuffer_destroy(stringbuffer_t *s)
Free the stringbuffer_t and all memory managed within it.
Definition: stringbuffer.c:72
const char * stringbuffer_getstring(stringbuffer_t *s)
Returns a reference to the internal string being managed by the stringbuffer.
Definition: stringbuffer.c:143

Here is the call graph for this function:

Here is the caller graph for this function: