aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_terse_write.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-04 14:58:45 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit551faf54e35c757144204bf7a7949c0f7d0a20a3 (patch)
treee8f761fc6361c75dd443d6e91806d27025d4102a /test/test_terse_write.c
parentc3bc111f7fb2a44e068e5250f7823352e44c76dc (diff)
downloadserd-551faf54e35c757144204bf7a7949c0f7d0a20a3.tar.gz
serd-551faf54e35c757144204bf7a7949c0f7d0a20a3.tar.bz2
serd-551faf54e35c757144204bf7a7949c0f7d0a20a3.zip
Make SerdBuffer an output stream
Diffstat (limited to 'test/test_terse_write.c')
-rw-r--r--test/test_terse_write.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/test/test_terse_write.c b/test/test_terse_write.c
index 277f025e..17bacc13 100644
--- a/test/test_terse_write.c
+++ b/test/test_terse_write.c
@@ -8,7 +8,6 @@
#include "serd/node.h"
#include "serd/sink.h"
#include "serd/statement.h"
-#include "serd/stream.h"
#include "serd/string_view.h"
#include "serd/syntax.h"
#include "serd/world.h"
@@ -25,7 +24,7 @@ static void
check_output(SerdWriter* writer, SerdBuffer* buffer, const char* expected)
{
serd_writer_finish(writer);
- serd_buffer_sink_finish(buffer);
+ serd_buffer_close(buffer);
const char* output = (const char*)buffer->buf;
@@ -54,8 +53,8 @@ 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);
+ SerdWriter* writer =
+ serd_writer_new(world, SERD_TURTLE, 0, env, serd_buffer_write, &buffer);
const SerdSink* sink = serd_writer_sink(writer);
@@ -87,7 +86,7 @@ test(void)
serd_sink_write(sink, 0, l2, rdf_rest, rdf_nil, NULL);
check_output(writer, &buffer, "[] rdf:value ( \"s1\" \"s2\" ) .\n");
- serd_buffer_sink_finish(&buffer);
+ serd_buffer_close(&buffer);
serd_writer_free(writer);
serd_node_free(rdf_nil);
serd_node_free(rdf_rest);