aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_reader_writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_reader_writer.c')
-rw-r--r--test/test_reader_writer.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c
index df2c3957..3a20bb7a 100644
--- a/test/test_reader_writer.c
+++ b/test/test_reader_writer.c
@@ -117,7 +117,8 @@ test_write_errors(void)
serd_writer_new(world, syntax, 0U, env, &out, 1U);
const SerdSink* const sink = serd_writer_sink(writer);
- SerdReader* const reader = serd_reader_new(world, SERD_TRIG, 0U, sink);
+ SerdReader* const reader =
+ serd_reader_new(world, SERD_TRIG, 0U, env, sink);
const char* position = doc_string;
SerdInputStream in = serd_open_input_string(&position);
@@ -251,16 +252,19 @@ test_reader(const char* path)
SerdSink* const sink = serd_sink_new(&rt, test_sink, NULL);
assert(sink);
+ SerdEnv* const env = serd_env_new(serd_empty_string());
+ assert(env);
+
// Test that too little stack space fails gracefully
const SerdLimits old_limits = serd_world_limits(world);
SerdLimits limits = old_limits;
limits.reader_stack_size = 32U;
serd_world_set_limits(world, limits);
- assert(!serd_reader_new(world, SERD_TURTLE, 0U, sink));
+ assert(!serd_reader_new(world, SERD_TURTLE, 0U, env, sink));
// Restore limits and successfully create reader
serd_world_set_limits(world, old_limits);
- SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0U, sink);
+ SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0U, env, sink);
assert(reader);
assert(serd_reader_read_chunk(reader) == SERD_BAD_CALL);
@@ -285,6 +289,7 @@ test_reader(const char* path)
serd_close_input(&in);
serd_reader_free(reader);
+ serd_env_free(env);
serd_sink_free(sink);
serd_world_free(world);
}