aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_terse_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_terse_write.c')
-rw-r--r--test/test_terse_write.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/test_terse_write.c b/test/test_terse_write.c
index 9a19d493..59227332 100644
--- a/test/test_terse_write.c
+++ b/test/test_terse_write.c
@@ -64,10 +64,11 @@ test(void)
serd_env_set_prefix(env, SERD_STRING("rdf"), SERD_STRING(NS_RDF));
- SerdWriter* writer = serd_writer_new(
- world, SERD_TURTLE, 0, env, (SerdWriteFunc)serd_buffer_sink, &buffer);
+ SerdByteSink* const byte_sink = serd_byte_sink_new_buffer(&buffer);
+ SerdWriter* const writer =
+ serd_writer_new(world, SERD_TURTLE, 0, env, byte_sink);
- const SerdSink* sink = serd_writer_sink(writer);
+ const SerdSink* const sink = serd_writer_sink(writer);
// Simple lone list
serd_sink_write(sink, SERD_TERSE_S | SERD_LIST_S, l1, rdf_first, s1, NULL);
@@ -99,6 +100,7 @@ test(void)
serd_buffer_sink_finish(&buffer);
serd_writer_free(writer);
+ serd_byte_sink_free(byte_sink);
serd_nodes_free(nodes);
serd_env_free(env);
serd_world_free(world);