MCPcopy Create free account
hub / github.com/codr7/hacktical-c / stream1_tests

Function stream1_tests

stream1/tests.c:5–11  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3#include "stream1.h"
4
5void stream1_tests() {
6 struct hc_memory_stream s;
7 hc_memory_stream_init(&s, &hc_malloc_default);
8 hc_defer(hc_stream_deinit(&s.stream));
9 hc_printf(&s.stream, "%s%d", "foo", 42);
10 assert(strcmp("foo42", hc_memory_stream_string(&s)) == 0);
11}

Callers 1

mainFunction · 0.85

Calls 4

hc_memory_stream_initFunction · 0.85
hc_stream_deinitFunction · 0.85
hc_printfFunction · 0.85
hc_memory_stream_stringFunction · 0.85

Tested by

no test coverage detected