From 847e4c265ac82709058abc352169432fc2b6a43a Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 26 Dec 2018 20:04:27 -0500 Subject: Remove serd_reader_set_default_graph() --- tests/serd_test.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/serd_test.c b/tests/serd_test.c index 4ff4c8f4..fa13c1b2 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -51,8 +51,7 @@ test_strtod(double dbl, double max_delta) } typedef struct { - int n_statements; - const SerdNode* graph; + int n_statements; } ReaderTest; static SerdStatus @@ -65,7 +64,6 @@ test_sink(void* handle, ReaderTest* rt = (ReaderTest*)handle; ++rt->n_statements; - rt->graph = serd_statement_graph(statement); return SERD_SUCCESS; } @@ -700,18 +698,15 @@ test_reader(const char* path) { SerdWorld* world = serd_world_new(); - ReaderTest rt = { 0, NULL }; + ReaderTest rt = { 0 }; SerdSink* sink = serd_sink_new(&rt); serd_sink_set_statement_func(sink, test_sink); SerdReader* reader = serd_reader_new(world, SERD_TURTLE, sink, 4096); assert(reader); - SerdNode* g = serd_new_uri("http://example.org/"); - serd_reader_set_default_graph(reader, g); serd_reader_add_blank_prefix(reader, "tmp"); serd_reader_add_blank_prefix(reader, NULL); - serd_node_free(g); assert(serd_reader_start_file(reader, "http://notafile", false)); assert(serd_reader_start_file(reader, "file://invalid", false)); @@ -720,8 +715,6 @@ test_reader(const char* path) assert(!serd_reader_start_file(reader, path, true)); assert(!serd_reader_read_document(reader)); assert(rt.n_statements == 13); - assert(rt.graph && serd_node_string(rt.graph) && - !strcmp(serd_node_string(rt.graph), "http://example.org/")); serd_reader_finish(reader); // A read of a big page hits EOF then fails to read chunks immediately -- cgit v1.2.1