diff options
author | David Robillard <d@drobilla.net> | 2018-12-29 20:05:00 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 16:27:02 -0500 |
commit | 41c4935f03caef37baff3d22310b90abd300fd02 (patch) | |
tree | 69bea30ba4292d94f187659837cf8f204f7ab8c2 /test | |
parent | 7a179e568a3576819d0e600cf35c94051e107d33 (diff) | |
download | serd-41c4935f03caef37baff3d22310b90abd300fd02.tar.gz serd-41c4935f03caef37baff3d22310b90abd300fd02.tar.bz2 serd-41c4935f03caef37baff3d22310b90abd300fd02.zip |
Rename SerdStyle to SerdWriterFlags
Diffstat (limited to 'test')
-rw-r--r-- | test/test_reader_writer.c | 15 | ||||
-rw-r--r-- | test/test_writer.c | 12 |
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, ¬hing, 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); |