diff options
author | David Robillard <d@drobilla.net> | 2016-03-15 23:21:34 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2018-05-27 18:18:30 +0200 |
commit | 9b3d8263604ba11ae008c8651a1fe2063296d6b1 (patch) | |
tree | 9747d428f34f73e5d2e9e72bd8edef50b05ddad9 /tests | |
parent | a0c483d9f1f3955499560ef1536fdb760df274fb (diff) | |
download | serd-9b3d8263604ba11ae008c8651a1fe2063296d6b1.tar.gz serd-9b3d8263604ba11ae008c8651a1fe2063296d6b1.tar.bz2 serd-9b3d8263604ba11ae008c8651a1fe2063296d6b1.zip |
Use SerdBuffer for mutable buffers
This avoids const violations from abusing SerdChunk as a mutable buffer
for string sinks.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/serd_test.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c index b80c8b82..62621e16 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -573,10 +573,10 @@ main(void) serd_writer_free(writer); - // Test chunk sink - SerdChunk chunk = { NULL, 0 }; + // Test buffer sink + SerdBuffer buffer = { NULL, 0 }; writer = serd_writer_new( - SERD_TURTLE, (SerdStyle)0, env, NULL, serd_chunk_sink, &chunk); + SERD_TURTLE, (SerdStyle)0, env, NULL, serd_buffer_sink, &buffer); o = serd_node_from_string(SERD_URI, USTR("http://example.org/base")); if (serd_writer_set_base_uri(writer, &o)) { @@ -584,10 +584,10 @@ main(void) } serd_writer_free(writer); - uint8_t* out = serd_chunk_sink_finish(&chunk); + uint8_t* out = serd_buffer_sink_finish(&buffer); if (strcmp((const char*)out, "@base <http://example.org/base> .\n")) { - FAILF("Incorrect chunk output:\n%s\n", chunk.buf); + FAILF("Incorrect buffer output:\n%s\n", buffer.buf); } free(out); |