diff options
author | David Robillard <d@drobilla.net> | 2018-12-26 20:04:27 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:07 -0500 |
commit | 9c00583bd37522a4f1703bf289587b4546edcf53 (patch) | |
tree | 745b6fd07df09ab2a5d6eb7119951dcbb9674e5d /test/test_reader_writer.c | |
parent | 6ea89ed78d344d01de4566ae7cc690c0cfe5673e (diff) | |
download | serd-9c00583bd37522a4f1703bf289587b4546edcf53.tar.gz serd-9c00583bd37522a4f1703bf289587b4546edcf53.tar.bz2 serd-9c00583bd37522a4f1703bf289587b4546edcf53.zip |
Remove serd_reader_set_default_graph()
Diffstat (limited to 'test/test_reader_writer.c')
-rw-r--r-- | test/test_reader_writer.c | 21 |
1 files changed, 7 insertions, 14 deletions
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 { |