From 9c00583bd37522a4f1703bf289587b4546edcf53 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() --- test/test_reader_writer.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'test/test_reader_writer.c') diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c index c634bc79..062f65fc 100644 --- a/test/test_reader_writer.c +++ b/test/test_reader_writer.c @@ -35,11 +35,10 @@ typedef struct { } ErrorContext; typedef struct { - int n_base; - int n_prefix; - int n_statement; - int n_end; - const SerdNode* graph; + int n_base; + int n_prefix; + int n_statement; + int n_end; } ReaderTest; static const char* const doc_string = @@ -94,6 +93,7 @@ test_statement_sink(void* handle, const SerdNode* predicate, const SerdNode* object) { + (void)graph; (void)flags; (void)subject; (void)predicate; @@ -101,7 +101,6 @@ test_statement_sink(void* handle, ReaderTest* rt = (ReaderTest*)handle; ++rt->n_statement; - rt->graph = graph; return SERD_SUCCESS; } @@ -553,7 +552,7 @@ static void test_reader(const char* path) { SerdWorld* world = serd_world_new(); - ReaderTest rt = {0, 0, 0, 0, NULL}; + ReaderTest rt = {0, 0, 0, 0}; SerdSink* const sink = serd_sink_new(&rt, NULL); assert(sink); @@ -571,8 +570,6 @@ test_reader(const char* path) assert(serd_reader_read_chunk(reader) == SERD_FAILURE); assert(serd_reader_read_document(reader) == SERD_FAILURE); - SerdNode* g = serd_new_uri(serd_string("http://example.org/")); - serd_reader_set_default_graph(reader, g); serd_reader_add_blank_prefix(reader, "tmp"); #if defined(__GNUC__) @@ -584,8 +581,6 @@ test_reader(const char* path) # pragma GCC diagnostic pop #endif - serd_node_free(g); - assert(serd_reader_start_file(reader, "http://notafile", false)); assert(serd_reader_start_file(reader, "file://invalid", false)); assert(serd_reader_start_file(reader, "file:///nonexistant", false)); @@ -596,9 +591,7 @@ test_reader(const char* path) assert(rt.n_prefix == 0); assert(rt.n_statement == 6); assert(rt.n_end == 0); - assert(rt.graph && serd_node_string(rt.graph) && - !strcmp(serd_node_string(rt.graph), "http://example.org/")); - serd_reader_finish(reader); + assert(!serd_reader_finish(reader)); // A read of a big page hits EOF then fails to read chunks immediately { -- cgit v1.2.1