diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/test_reader_writer.c | 2 | ||||
-rw-r--r-- | test/test_terse_write.c | 3 | ||||
-rw-r--r-- | test/test_writer.c | 10 |
3 files changed, 8 insertions, 7 deletions
diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c index 1bad22cd..b8afd649 100644 --- a/test/test_reader_writer.c +++ b/test/test_reader_writer.c @@ -121,7 +121,7 @@ test_writer(const char* const path) serd_writer_free(writer); serd_byte_sink_free(byte_sink); - char* out = serd_buffer_sink_finish(&buffer); + char* out = (char*)buffer.buf; assert(!strcmp(out, "@base <http://example.org/base> .\n")); serd_free(out); diff --git a/test/test_terse_write.c b/test/test_terse_write.c index 59227332..aeb264ea 100644 --- a/test/test_terse_write.c +++ b/test/test_terse_write.c @@ -29,7 +29,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; @@ -98,7 +98,6 @@ test(void) serd_sink_write(sink, 0, l2, rdf_rest, rdf_nil, NULL); check_output(writer, &buffer, "[]\n\trdf:value ( \"s1\" \"s2\" ) .\n"); - serd_buffer_sink_finish(&buffer); serd_writer_free(writer); serd_byte_sink_free(byte_sink); serd_nodes_free(nodes); diff --git a/test/test_writer.c b/test/test_writer.c index 89531eee..83d4087c 100644 --- a/test/test_writer.c +++ b/test/test_writer.c @@ -83,14 +83,15 @@ test_write_long_literal(void) serd_writer_free(writer); serd_byte_sink_free(byte_sink); serd_env_free(env); + serd_buffer_close(&buffer); - char* out = serd_buffer_sink_finish(&buffer); + char* out = (char*)buffer.buf; static const char* const expected = "<http://example.org/s>\n" "\t<http://example.org/p> \"\"\"hello \"\"\\\"world\"\"\\\"!\"\"\" .\n"; - assert(!strcmp((char*)out, expected)); + assert(!strcmp(out, expected)); serd_free(out); serd_world_free(world); @@ -369,10 +370,11 @@ check_pname_escape(const char* const lname, const char* const expected) serd_writer_free(writer); serd_byte_sink_free(byte_sink); serd_env_free(env); + serd_buffer_close(&buffer); - char* out = serd_buffer_sink_finish(&buffer); + char* out = (char*)buffer.buf; - assert(!strcmp((char*)out, expected)); + assert(!strcmp(out, expected)); serd_free(out); free(uri); |