aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-06-03 19:24:59 +0200
committerDavid Robillard <d@drobilla.net>2021-03-08 23:23:05 -0500
commit846553f8894264d64cdd1dfb08df56fe08189dac (patch)
tree6ca8d42da04999851491edcf6811d05d4962bcac /test
parent7c6c3159d1804f4855d9a4e0cd52486f61fcbab6 (diff)
downloadserd-846553f8894264d64cdd1dfb08df56fe08189dac.tar.gz
serd-846553f8894264d64cdd1dfb08df56fe08189dac.tar.bz2
serd-846553f8894264d64cdd1dfb08df56fe08189dac.zip
Add SerdStatement
Diffstat (limited to 'test')
-rw-r--r--test/test_read_chunk.c14
-rw-r--r--test/test_reader_writer.c16
2 files changed, 10 insertions, 20 deletions
diff --git a/test/test_read_chunk.c b/test/test_read_chunk.c
index 8be4ad63..d77c3398 100644
--- a/test/test_read_chunk.c
+++ b/test/test_read_chunk.c
@@ -48,19 +48,13 @@ on_prefix(void* handle, const SerdNode* name, const SerdNode* uri)
}
static SerdStatus
-on_statement(void* handle,
- SerdStatementFlags flags,
- const SerdNode* graph,
- const SerdNode* subject,
- const SerdNode* predicate,
- const SerdNode* object)
+on_statement(void* handle,
+ SerdStatementFlags flags,
+ const SerdStatement* statement)
{
(void)handle;
(void)flags;
- (void)graph;
- (void)subject;
- (void)predicate;
- (void)object;
+ (void)statement;
++n_statement;
return SERD_SUCCESS;
diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c
index 788b2d63..9ccfa967 100644
--- a/test/test_reader_writer.c
+++ b/test/test_reader_writer.c
@@ -26,18 +26,12 @@
#include <string.h>
static SerdStatus
-test_sink(void* handle,
- SerdStatementFlags flags,
- const SerdNode* graph,
- const SerdNode* subject,
- const SerdNode* predicate,
- const SerdNode* object)
+test_sink(void* handle,
+ SerdStatementFlags flags,
+ const SerdStatement* statement)
{
(void)flags;
- (void)subject;
- (void)predicate;
- (void)object;
- (void)graph;
+ (void)statement;
++*(size_t*)handle;
@@ -164,6 +158,8 @@ test_read_string(void)
serd_sink_set_statement_func(sink, test_sink);
+ serd_sink_set_statement_func(sink, test_sink);
+
// Test reading a string that ends exactly at the end of input (no newline)
assert(
!serd_reader_start_string(reader,