diff options
Diffstat (limited to 'test/test_writer.c')
-rw-r--r-- | test/test_writer.c | 10 |
1 files changed, 6 insertions, 4 deletions
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); |