From 52a0e3cc05f0e865bd2652f5c956a853fb86dc0c 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 7de0025d..f1d6fad9 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -63,8 +63,7 @@ count_prefixes(void* handle, const SerdNode* name, const SerdNode* uri) } typedef struct { - int n_statements; - const SerdNode* graph; + int n_statements; } ReaderTest; static SerdStatus @@ -77,7 +76,6 @@ test_sink(void* handle, ReaderTest* rt = (ReaderTest*)handle; ++rt->n_statements; - rt->graph = serd_statement_get_graph(statement); return SERD_SUCCESS; } @@ -570,18 +568,15 @@ main(void) // Rewind and test reader fseek(fd, 0, SEEK_SET); - 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)); @@ -590,8 +585,6 @@ main(void) assert(!serd_reader_start_file(reader, path, true)); assert(!serd_reader_read_document(reader)); assert(rt.n_statements == 13); - assert(rt.graph && serd_node_get_string(rt.graph) && - !strcmp(serd_node_get_string(rt.graph), "http://example.org/")); serd_reader_finish(reader); serd_reader_free(reader); -- cgit v1.2.1