diff options
author | David Robillard <d@drobilla.net> | 2021-07-09 21:39:31 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2022-01-13 23:04:26 -0500 |
commit | 4424a6f7781fcb9095618b2f2c846f3f99859b49 (patch) | |
tree | 0b26affd734bbfe08aed08968e6dc1d6735ec90d /test | |
parent | 51f1de0235cfb091fcc481fa97d48326295d2c58 (diff) | |
download | serd-4424a6f7781fcb9095618b2f2c846f3f99859b49.tar.gz serd-4424a6f7781fcb9095618b2f2c846f3f99859b49.tar.bz2 serd-4424a6f7781fcb9095618b2f2c846f3f99859b49.zip |
Replace serd_reader_set_strict() with SerdReaderFlags
Diffstat (limited to 'test')
-rw-r--r-- | test/test_overflow.c | 6 | ||||
-rw-r--r-- | test/test_read_chunk.c | 2 | ||||
-rw-r--r-- | test/test_reader.c | 9 | ||||
-rw-r--r-- | test/test_reader_writer.c | 4 |
4 files changed, 12 insertions, 9 deletions
diff --git a/test/test_overflow.c b/test/test_overflow.c index f29c8652..8395a13b 100644 --- a/test/test_overflow.c +++ b/test/test_overflow.c @@ -30,8 +30,10 @@ test_size(SerdWorld* const world, const SerdSyntax syntax, const size_t stack_size) { - SerdSink* sink = serd_sink_new(NULL, NULL, NULL); - SerdReader* const reader = serd_reader_new(world, syntax, sink, stack_size); + SerdSink* sink = serd_sink_new(NULL, NULL, NULL); + SerdReader* const reader = + serd_reader_new(world, syntax, 0u, sink, stack_size); + assert(reader); serd_reader_start_string(reader, str, NULL); diff --git a/test/test_read_chunk.c b/test/test_read_chunk.c index 0055ef3a..78cd402e 100644 --- a/test/test_read_chunk.c +++ b/test/test_read_chunk.c @@ -94,7 +94,7 @@ main(void) SerdWorld* world = serd_world_new(); SerdSink* sink = serd_sink_new(NULL, on_event, NULL); - 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/test/test_reader.c b/test/test_reader.c index a641a26a..532411c6 100644 --- a/test/test_reader.c +++ b/test/test_reader.c @@ -41,7 +41,7 @@ test_read_string(void) SerdSink* sink = serd_sink_new(&n_statements, count_statements, NULL); assert(sink); - SerdReader* reader = serd_reader_new(world, SERD_TURTLE, sink, 4096); + SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0u, sink, 4096); assert(reader); // Test reading a string that ends exactly at the end of input (no newline) @@ -118,7 +118,7 @@ test_read_eof_by_page(void) SerdWorld* world = serd_world_new(); size_t ignored = 0u; SerdSink* sink = serd_sink_new(&ignored, count_statements, NULL); - SerdReader* reader = serd_reader_new(world, SERD_TURTLE, sink, 4096); + SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0u, sink, 4096); serd_reader_start_stream( reader, (SerdReadFunc)fread, (SerdStreamErrorFunc)ferror, temp, NULL, 4096); @@ -140,7 +140,7 @@ test_read_eof_by_byte(void) SerdWorld* world = serd_world_new(); size_t ignored = 0u; SerdSink* sink = serd_sink_new(&ignored, count_statements, NULL); - SerdReader* reader = serd_reader_new(world, SERD_TURTLE, sink, 4096); + SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0u, sink, 4096); size_t n_reads = 0u; serd_reader_start_stream(reader, @@ -171,7 +171,8 @@ test_read_chunks(void) SerdSink* const sink = serd_sink_new(&n_statements, count_statements, NULL); assert(sink); - SerdReader* const reader = serd_reader_new(world, SERD_TURTLE, sink, 4096); + SerdReader* const reader = + serd_reader_new(world, SERD_TURTLE, 0u, sink, 4096); assert(reader); SerdStatus st = serd_reader_start_stream( diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c index fa45786c..41f6aee0 100644 --- a/test/test_reader_writer.c +++ b/test/test_reader_writer.c @@ -144,9 +144,9 @@ test_reader(const char* path) assert(sink); // Test that too little stack space fails gracefully - assert(!serd_reader_new(world, SERD_TURTLE, sink, 32)); + assert(!serd_reader_new(world, SERD_TURTLE, 0u, sink, 32)); - SerdReader* reader = serd_reader_new(world, SERD_TURTLE, sink, 4096); + SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0u, sink, 4096); assert(reader); serd_reader_add_blank_prefix(reader, "tmp"); |