aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_writer.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-03-27 05:39:26 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit7ffa2c0488fcd96c3c12713e5650633eb03e91f7 (patch)
tree9ca96bb40f71b6c37789ae641af75e39a2751c18 /test/test_writer.c
parent5e4538756d601e6a941c5290777af95ea8848e1a (diff)
downloadserd-7ffa2c0488fcd96c3c12713e5650633eb03e91f7.tar.gz
serd-7ffa2c0488fcd96c3c12713e5650633eb03e91f7.tar.bz2
serd-7ffa2c0488fcd96c3c12713e5650633eb03e91f7.zip
[WIP] Move SerdEnv mutation from writer to reader
Writing having side-effects seems questionable in general, and this prepares things for expanding URIs in the reader.
Diffstat (limited to 'test/test_writer.c')
-rw-r--r--test/test_writer.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/test/test_writer.c b/test/test_writer.c
index 9ce69c55..f76cc800 100644
--- a/test/test_writer.c
+++ b/test/test_writer.c
@@ -66,37 +66,6 @@ test_write_bad_event(void)
}
static void
-test_write_bad_prefix(void)
-{
- SerdWorld* world = serd_world_new();
- SerdEnv* env = serd_env_new(serd_empty_string());
- SerdBuffer buffer = {NULL, 0};
- SerdOutputStream output = serd_open_output_buffer(&buffer);
- SerdWriter* writer =
- serd_writer_new(world, SERD_TURTLE, 0U, env, &output, 1U);
-
- assert(writer);
-
- SerdNode* name = serd_new_string(serd_string("eg"));
- SerdNode* uri = serd_new_uri(serd_string("rel"));
-
- assert(serd_sink_write_prefix(serd_writer_sink(writer), name, uri) ==
- SERD_BAD_ARG);
-
- serd_buffer_close(&buffer);
-
- char* const out = (char*)buffer.buf;
- assert(!strcmp(out, ""));
- serd_free(out);
-
- serd_node_free(uri);
- serd_node_free(name);
- serd_writer_free(writer);
- serd_env_free(env);
- serd_world_free(world);
-}
-
-static void
test_write_long_literal(void)
{
SerdWorld* world = serd_world_new();
@@ -442,7 +411,6 @@ main(void)
{
test_writer_new();
test_write_bad_event();
- test_write_bad_prefix();
test_write_long_literal();
test_writer_cleanup();
test_strict_write();