aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_reader_writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_reader_writer.c')
-rw-r--r--test/test_reader_writer.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c
index fec09ff8..e0f636e9 100644
--- a/test/test_reader_writer.c
+++ b/test/test_reader_writer.c
@@ -77,7 +77,7 @@ 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, 0, sink, 4096);
assert(reader);
SerdStatus st = serd_reader_start_stream(
@@ -148,12 +148,12 @@ test_get_blank(void)
static int
test_strict_write(void)
{
- SerdWorld* world = serd_world_new();
- const char* path = "serd_strict_write_test.ttl";
- FILE* fd = fopen(path, "wb");
- SerdEnv* env = serd_env_new(SERD_EMPTY_STRING());
- SerdWriter* writer = serd_writer_new(
- world, SERD_TURTLE, SERD_WRITE_STRICT, env, (SerdWriteFunc)fwrite, fd);
+ SerdWorld* world = serd_world_new();
+ const char* path = "serd_strict_write_test.ttl";
+ FILE* fd = fopen(path, "wb");
+ SerdEnv* env = serd_env_new(SERD_EMPTY_STRING());
+ SerdWriter* writer =
+ serd_writer_new(world, SERD_TURTLE, 0, env, (SerdWriteFunc)fwrite, fd);
assert(fd);
assert(writer);
@@ -184,13 +184,13 @@ test_strict_write(void)
static void
test_read_string(void)
{
- SerdWorld* world = serd_world_new();
- size_t n_statements = 0;
+ SerdWorld* const world = serd_world_new();
+ size_t n_statements = 0;
- SerdSink* sink = serd_sink_new(&n_statements, count_statements, NULL);
+ SerdSink* const sink = serd_sink_new(&n_statements, count_statements, NULL);
assert(sink);
- SerdReader* reader = serd_reader_new(world, SERD_TURTLE, sink, 4096);
+ SerdReader* const reader = serd_reader_new(world, SERD_TURTLE, 0, sink, 4096);
assert(reader);
// Test reading a string that ends exactly at the end of input (no newline)
@@ -218,8 +218,8 @@ test_writer(const char* const path)
SerdWorld* world = serd_world_new();
- SerdWriter* writer =
- serd_writer_new(world, SERD_TURTLE, 0, env, (SerdWriteFunc)fwrite, fd);
+ SerdWriter* writer = serd_writer_new(
+ world, SERD_TURTLE, SERD_WRITE_LAX, env, (SerdWriteFunc)fwrite, fd);
assert(writer);
serd_writer_chop_blank_prefix(writer, "tmp");
@@ -324,7 +324,7 @@ test_reader(const char* path)
SerdSink* const 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, 0, sink, 4096);
assert(reader);
serd_reader_add_blank_prefix(reader, "tmp");