aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-12-26 20:04:27 -0500
committerDavid Robillard <d@drobilla.net>2018-12-31 11:37:48 -0500
commitb69236b298c0263f7233562d83df5e6278def5a7 (patch)
treed8115def2a042cd355170202df5f8b46ec7960fb /tests
parent08bf8fdb616ed4a753cc6f0092f3dea9e520a96f (diff)
downloadserd-b69236b298c0263f7233562d83df5e6278def5a7.tar.gz
serd-b69236b298c0263f7233562d83df5e6278def5a7.tar.bz2
serd-b69236b298c0263f7233562d83df5e6278def5a7.zip
Remove Remove serd_reader_set_default_graph()
Diffstat (limited to 'tests')
-rw-r--r--tests/serd_test.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index 81a1ef41..9604ecd7 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);