diff options
Diffstat (limited to 'test/test_reader.c')
-rw-r--r-- | test/test_reader.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/test_reader.c b/test/test_reader.c index 54dbca9f..3d59af8e 100644 --- a/test/test_reader.c +++ b/test/test_reader.c @@ -10,6 +10,7 @@ #include "serd/event.h" #include "serd/input_stream.h" #include "serd/node.h" +#include "serd/nodes.h" #include "serd/reader.h" #include "serd/sink.h" #include "serd/statement.h" @@ -613,6 +614,7 @@ static void test_error_cursor(void) { SerdWorld* const world = serd_world_new(NULL); + SerdNodes* const nodes = serd_world_nodes(world); bool called = false; SerdSink* const sink = serd_sink_new(NULL, &called, check_cursor, NULL); SerdEnv* const env = serd_env_new(NULL, serd_empty_string()); @@ -624,9 +626,11 @@ test_error_cursor(void) "<http://example.org/s> <http://example.org/p> " "<http://example.org/o> ."; - SerdNode* const string_name = serd_node_new(NULL, serd_a_string("string")); - const char* position = string; - SerdInputStream in = serd_open_input_string(&position); + const SerdNode* const string_name = + serd_nodes_get(nodes, serd_a_string("string")); + + const char* position = string; + SerdInputStream in = serd_open_input_string(&position); SerdStatus st = serd_reader_start(reader, &in, string_name, 1); assert(!st); @@ -635,7 +639,6 @@ test_error_cursor(void) assert(called); assert(!serd_close_input(&in)); - serd_node_free(NULL, string_name); serd_reader_free(reader); serd_env_free(env); serd_sink_free(sink); |