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>2020-10-27 13:13:58 +0100
commit847e4c265ac82709058abc352169432fc2b6a43a (patch)
tree959637100894b720210b2d74af5df6a98ab518c3 /tests
parente2746ac58445ed1a774b545efab4a457bb6b5ac1 (diff)
downloadserd-847e4c265ac82709058abc352169432fc2b6a43a.tar.gz
serd-847e4c265ac82709058abc352169432fc2b6a43a.tar.bz2
serd-847e4c265ac82709058abc352169432fc2b6a43a.zip
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 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