aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2019-04-28 17:54:00 +0200
committerDavid Robillard <d@drobilla.net>2020-10-27 13:13:58 +0100
commit44e792d8da5ef93a88dac76b7b191e588203c42b (patch)
tree654d6767998c0a444f8eff8fd3de2461295e1fa3 /tests
parent02f77d71211825b590e43f571b1d65bcf56cde4d (diff)
downloadserd-44e792d8da5ef93a88dac76b7b191e588203c42b.tar.gz
serd-44e792d8da5ef93a88dac76b7b191e588203c42b.tar.bz2
serd-44e792d8da5ef93a88dac76b7b191e588203c42b.zip
Replace serd_reader_set_strict() with SerdReaderFlags
This makes reader options extensible and should hopefully prevent the need for grafting on more similar functions in the future.
Diffstat (limited to 'tests')
-rw-r--r--tests/overflow_test.c4
-rw-r--r--tests/read_chunk_test.c2
-rw-r--r--tests/serd_test.c10
3 files changed, 9 insertions, 7 deletions
diff --git a/tests/overflow_test.c b/tests/overflow_test.c
index 917d02bf..918f1cc4 100644
--- a/tests/overflow_test.c
+++ b/tests/overflow_test.c
@@ -24,7 +24,9 @@
static SerdStatus
test(SerdWorld* world, SerdSink* sink, const char* str, size_t stack_size)
{
- SerdReader* reader = serd_reader_new(world, SERD_TURTLE, sink, stack_size);
+ SerdReader* reader =
+ serd_reader_new(world, SERD_TURTLE, 0, sink, stack_size);
+
serd_reader_start_string(reader, str, NULL);
const SerdStatus st = serd_reader_read_document(reader);
serd_reader_free(reader);
diff --git a/tests/read_chunk_test.c b/tests/read_chunk_test.c
index 56c6abdc..31b11603 100644
--- a/tests/read_chunk_test.c
+++ b/tests/read_chunk_test.c
@@ -80,7 +80,7 @@ main(void)
serd_sink_set_statement_func(sink, on_statement);
serd_sink_set_end_func(sink, on_end);
- SerdReader* reader = serd_reader_new(world, SERD_TURTLE, sink, 4096);
+ SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0, sink, 4096);
assert(reader);
assert(!serd_reader_start_string(reader,
diff --git a/tests/serd_test.c b/tests/serd_test.c
index a42fe02a..599e948a 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -124,7 +124,7 @@ test_read_chunks(void)
assert(sink);
serd_sink_set_statement_func(sink, count_statements);
- SerdReader* reader = serd_reader_new(world, SERD_TURTLE, sink, 4096);
+ SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0, sink, 4096);
assert(reader);
assert(f);
@@ -206,7 +206,7 @@ test_strict_write(void)
SerdEnv* env = serd_env_new(NULL);
SerdWriter* writer = serd_writer_new(world,
SERD_TURTLE,
- SERD_WRITE_STRICT,
+ 0,
env,
(SerdWriteFunc)fwrite,
fd);
@@ -239,7 +239,7 @@ test_read_string(void)
SerdWorld* world = serd_world_new();
size_t n_statements = 0;
SerdSink* sink = serd_sink_new(&n_statements, NULL);
- SerdReader* reader = serd_reader_new(world, SERD_TURTLE, sink, 4096);
+ SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0, sink, 4096);
assert(reader);
serd_sink_set_statement_func(sink, count_statements);
@@ -657,7 +657,7 @@ test_writer(const char* const path)
SerdWriter* writer = serd_writer_new(world,
SERD_TURTLE,
- 0,
+ SERD_WRITE_LAX,
env,
(SerdWriteFunc)fwrite,
fd);
@@ -772,7 +772,7 @@ test_reader(const char* path)
SerdSink* sink = serd_sink_new(&n_statements, NULL);
serd_sink_set_statement_func(sink, count_statements);
- SerdReader* reader = serd_reader_new(world, SERD_TURTLE, sink, 4096);
+ SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0, sink, 4096);
assert(reader);
serd_reader_add_blank_prefix(reader, "tmp");