PostGIS  2.5.7dev-r@@SVN_REVISION@@

◆ test_stringbuffer_aprintf()

static void test_stringbuffer_aprintf ( void  )
static

Definition at line 36 of file cu_stringbuffer.c.

37 {
38  stringbuffer_t *sb;
39  const char *str;
40 
42  stringbuffer_aprintf(sb, "hello %dth world", 14);
43  str = stringbuffer_getstring(sb);
44 
45  CU_ASSERT_STRING_EQUAL("hello 14th world", str);
46 
48 }
stringbuffer_t * stringbuffer_create_with_size(size_t size)
Allocate a new stringbuffer_t.
Definition: stringbuffer.c:65
int stringbuffer_aprintf(stringbuffer_t *s, const char *fmt,...)
Appends a formatted string to the current string buffer, using the format and argument list provided.
Definition: stringbuffer.c:253
void stringbuffer_destroy(stringbuffer_t *s)
Free the stringbuffer_t and all memory managed within it.
Definition: stringbuffer.c:78
const char * stringbuffer_getstring(stringbuffer_t *s)
Returns a reference to the internal string being managed by the stringbuffer.
Definition: stringbuffer.c:149

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

Referenced by stringbuffer_suite_setup().

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