aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_reader_writer.c15
-rw-r--r--test/test_writer.c12
2 files changed, 14 insertions, 13 deletions
diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c
index bb27cf3e..6c759d8d 100644
--- a/test/test_reader_writer.c
+++ b/test/test_reader_writer.c
@@ -394,8 +394,9 @@ quiet_error_sink(void* const handle, const SerdError* const e)
static void
test_write_errors(void)
{
- ErrorContext ctx = {0U, 0U};
- const SerdStyle style = (SerdStyle)(SERD_STYLE_STRICT | SERD_STYLE_CURIED);
+ ErrorContext ctx = {0U, 0U};
+ const SerdWriterFlags style =
+ (SerdWriterFlags)(SERD_WRITE_STRICT | SERD_WRITE_CURIED);
const size_t max_offsets[] = {0, 386, 1911, 2003, 386};
@@ -440,7 +441,7 @@ test_writer(const char* const path)
assert(fd);
SerdWriter* writer =
- serd_writer_new(SERD_TURTLE, (SerdStyle)0, env, NULL, serd_file_sink, fd);
+ serd_writer_new(SERD_TURTLE, 0, env, NULL, serd_file_sink, fd);
assert(writer);
serd_writer_chop_blank_prefix(writer, "tmp");
@@ -516,8 +517,8 @@ test_writer(const char* const path)
// Test buffer sink
SerdBuffer buffer = {NULL, 0};
- writer = serd_writer_new(
- SERD_TURTLE, (SerdStyle)0, env, NULL, serd_buffer_sink, &buffer);
+ writer =
+ serd_writer_new(SERD_TURTLE, 0, env, NULL, serd_buffer_sink, &buffer);
o = serd_node_from_string(SERD_URI, "http://example.org/base");
assert(!serd_writer_set_base_uri(writer, &o));
@@ -533,8 +534,8 @@ test_writer(const char* const path)
buffer.buf = NULL;
buffer.len = 0;
- writer = serd_writer_new(
- SERD_TURTLE, (SerdStyle)0, env, NULL, serd_buffer_sink, &buffer);
+ writer =
+ serd_writer_new(SERD_TURTLE, 0U, env, NULL, serd_buffer_sink, &buffer);
assert(!serd_writer_write_statement(
writer, 0, NULL, &s, &p, &nothing, NULL, NULL));
diff --git a/test/test_writer.c b/test/test_writer.c
index aa1b05e7..783bf3b0 100644
--- a/test/test_writer.c
+++ b/test/test_writer.c
@@ -15,8 +15,8 @@ test_write_long_literal(void)
{
SerdEnv* env = serd_env_new(NULL);
SerdBuffer buffer = {NULL, 0};
- SerdWriter* writer = serd_writer_new(
- SERD_TURTLE, (SerdStyle)0, env, NULL, serd_buffer_sink, &buffer);
+ SerdWriter* writer =
+ serd_writer_new(SERD_TURTLE, 0U, env, NULL, serd_buffer_sink, &buffer);
assert(writer);
@@ -54,7 +54,7 @@ test_writer_cleanup(void)
SerdStatus st = SERD_SUCCESS;
SerdEnv* env = serd_env_new(NULL);
SerdWriter* writer =
- serd_writer_new(SERD_TURTLE, (SerdStyle)0U, env, NULL, null_sink, NULL);
+ serd_writer_new(SERD_TURTLE, 0U, env, NULL, null_sink, NULL);
SerdNode s = serd_node_from_string(SERD_URI, "http://example.org/s");
SerdNode p = serd_node_from_string(SERD_URI, "http://example.org/p");
@@ -98,7 +98,7 @@ test_strict_write(void)
SerdEnv* const env = serd_env_new(NULL);
SerdWriter* const writer = serd_writer_new(
- SERD_TURTLE, (SerdStyle)SERD_STYLE_STRICT, env, NULL, null_sink, fd);
+ SERD_TURTLE, (SerdWriterFlags)SERD_WRITE_STRICT, env, NULL, null_sink, fd);
assert(writer);
@@ -141,8 +141,8 @@ test_write_error(void)
SerdNode u = serd_node_from_string(SERD_URI, "http://example.com/u");
- writer =
- serd_writer_new(SERD_TURTLE, (SerdStyle)0, env, NULL, error_sink, NULL);
+ writer = serd_writer_new(
+ SERD_TURTLE, (SerdWriterFlags)0, env, NULL, error_sink, NULL);
assert(writer);
st = serd_writer_write_statement(writer, 0U, NULL, &u, &u, &u, NULL, NULL);
assert(st == SERD_ERR_BAD_WRITE);