diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/serd_test.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c index d0025ec9..28e1f4b6 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -441,6 +441,8 @@ main(void) // Test SerdEnv + SerdWorld* world = serd_world_new(); + SerdNode* u = serd_node_new_string(SERD_URI, "http://example.org/foo"); SerdNode* b = serd_node_new_string(SERD_CURIE, "invalid"); SerdNode* c = serd_node_new_string(SERD_CURIE, "eg.2:b"); @@ -529,8 +531,13 @@ main(void) FAILF("Failed to open file %s\n", path); } - SerdWriter* writer = serd_writer_new( - SERD_TURTLE, (SerdStyle)0, env, NULL, (SerdWriteFunc)fwrite, fd); + SerdWriter* writer = serd_writer_new(world, + SERD_TURTLE, + (SerdStyle)0, + env, + NULL, + (SerdWriteFunc)fwrite, + fd); if (!writer) { FAIL("Failed to create writer\n"); } @@ -623,7 +630,7 @@ main(void) // Test buffer sink SerdBuffer buffer = { NULL, 0 }; writer = serd_writer_new( - SERD_TURTLE, (SerdStyle)0, env, NULL, serd_buffer_sink, &buffer); + world, SERD_TURTLE, (SerdStyle)0, env, NULL, serd_buffer_sink, &buffer); o = serd_node_new_string(SERD_URI, "http://example.org/base"); if (serd_writer_set_base_uri(writer, o)) { @@ -645,7 +652,7 @@ main(void) ReaderTest* rt = (ReaderTest*)calloc(1, sizeof(ReaderTest)); SerdSink sink = { rt, NULL, NULL, test_sink, NULL }; - SerdReader* reader = serd_reader_new(SERD_TURTLE, &sink); + SerdReader* reader = serd_reader_new(world, SERD_TURTLE, &sink); if (!reader) { FAIL("Failed to create reader\n"); } @@ -682,6 +689,7 @@ main(void) fclose(fd); serd_env_free(env); + serd_world_free(world); printf("Success\n"); return 0; |