aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_overflow.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_overflow.c')
-rw-r--r--test/test_overflow.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/test_overflow.c b/test/test_overflow.c
index edabd4eb..abc7d989 100644
--- a/test/test_overflow.c
+++ b/test/test_overflow.c
@@ -22,14 +22,16 @@ test_size(SerdWorld* const world,
limits.reader_stack_size = stack_size;
serd_world_set_limits(world, limits);
- SerdSink* sink = serd_sink_new(NULL, NULL, NULL, NULL);
- SerdEnv* const env = serd_env_new(NULL, serd_empty_string());
- SerdReader* const reader = serd_reader_new(world, syntax, flags, env, sink);
+ SerdNodes* const nodes = serd_world_nodes(world);
+ SerdAllocator* const alloc = serd_world_allocator(world);
+ SerdSink* sink = serd_sink_new(alloc, NULL, NULL, NULL);
+ SerdEnv* const env = serd_env_new(alloc, serd_empty_string());
+ SerdReader* const reader = serd_reader_new(world, syntax, flags, env, sink);
if (!reader) {
return SERD_BAD_STACK;
}
- SerdNode* string_name = serd_node_new(NULL, serd_a_string("string"));
+ const SerdNode* string_name = serd_nodes_get(nodes, serd_a_string("string"));
const char* position = str;
SerdInputStream in = serd_open_input_string(&position);
serd_reader_start(reader, &in, string_name, 1);
@@ -37,7 +39,6 @@ test_size(SerdWorld* const world,
const SerdStatus st = serd_reader_read_document(reader);
serd_close_input(&in);
- serd_node_free(NULL, string_name);
serd_reader_free(reader);
serd_env_free(env);
serd_sink_free(sink);