diff options
author | David Robillard <d@drobilla.net> | 2020-08-14 16:05:10 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 16:27:02 -0500 |
commit | 672e90382da08efa8f593fdc9081e31d0e548fa0 (patch) | |
tree | 3f70c13dda1e60e7b058c750002ec320bfaa6a73 /test/test_writer.c | |
parent | fff826f406e0b9975fd8672041e50dd1a342339f (diff) | |
download | serd-672e90382da08efa8f593fdc9081e31d0e548fa0.tar.gz serd-672e90382da08efa8f593fdc9081e31d0e548fa0.tar.bz2 serd-672e90382da08efa8f593fdc9081e31d0e548fa0.zip |
Merge datatype/language into node
This moves closer to the sord API, and is more convenient in most cases.
Diffstat (limited to 'test/test_writer.c')
-rw-r--r-- | test/test_writer.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/test/test_writer.c b/test/test_writer.c index 9d004076..68d9e14e 100644 --- a/test/test_writer.c +++ b/test/test_writer.c @@ -31,7 +31,7 @@ test_write_long_literal(void) SerdNode* p = serd_new_string(SERD_URI, "http://example.org/p"); SerdNode* o = serd_new_string(SERD_LITERAL, "hello \"\"\"world\"\"\"!"); - assert(!serd_writer_write_statement(writer, 0, NULL, s, p, o, NULL, NULL)); + assert(!serd_writer_write_statement(writer, 0, NULL, s, p, o)); serd_node_free(o); serd_node_free(p); @@ -70,9 +70,7 @@ test_writer_cleanup(void) SerdNode* p = serd_new_string(SERD_URI, "http://example.org/p"); SerdNode* o = serd_new_string(SERD_BLANK, "http://example.org/o"); - st = serd_writer_write_statement( - writer, SERD_ANON_O_BEGIN, NULL, s, p, o, NULL, NULL); - + st = serd_writer_write_statement(writer, SERD_ANON_O_BEGIN, NULL, s, p, o); assert(!st); // Write the start of several nested anonymous objects @@ -83,7 +81,7 @@ test_writer_cleanup(void) SerdNode* next_o = serd_new_string(SERD_BLANK, buf); st = serd_writer_write_statement( - writer, SERD_ANON_O_BEGIN, NULL, o, p, next_o, NULL, NULL); + writer, SERD_ANON_O_BEGIN, NULL, o, p, next_o); serd_node_free(o); o = next_o; @@ -124,11 +122,11 @@ test_strict_write(void) SerdNode* bad_lit = serd_new_string(SERD_LITERAL, (const char*)bad_str); SerdNode* bad_uri = serd_new_string(SERD_URI, (const char*)bad_str); - assert(serd_writer_write_statement( - writer, 0, NULL, s, p, bad_lit, NULL, NULL) == SERD_BAD_TEXT); + assert(serd_writer_write_statement(writer, 0, NULL, s, p, bad_lit) == + SERD_BAD_TEXT); - assert(serd_writer_write_statement( - writer, 0, NULL, s, p, bad_uri, NULL, NULL) == SERD_BAD_TEXT); + assert(serd_writer_write_statement(writer, 0, NULL, s, p, bad_uri) == + SERD_BAD_TEXT); serd_node_free(bad_uri); serd_node_free(bad_lit); @@ -162,7 +160,7 @@ test_write_error(void) 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); + st = serd_writer_write_statement(writer, 0U, NULL, u, u, u); assert(st == SERD_BAD_WRITE); serd_writer_free(writer); |