diff options
author | David Robillard <d@drobilla.net> | 2018-11-18 18:26:37 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-06-21 18:12:04 +0200 |
commit | a9f7c1f4f4dd7846b3c054eb3f8556b65b7fdf0c (patch) | |
tree | 2bd798b3b251fc5c482357147e0e700a4ecb8791 /tests | |
parent | 5c44e69fe6f801b7287276c7c2eb500197b087b2 (diff) | |
download | serd-a9f7c1f4f4dd7846b3c054eb3f8556b65b7fdf0c.tar.gz serd-a9f7c1f4f4dd7846b3c054eb3f8556b65b7fdf0c.tar.bz2 serd-a9f7c1f4f4dd7846b3c054eb3f8556b65b7fdf0c.zip |
Improve node test coverage
Diffstat (limited to 'tests')
-rw-r--r-- | tests/serd_test.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c index 16550e0f..9277de88 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -415,6 +415,8 @@ test_literal(void) assert(!serd_new_typed_literal(NULL, NULL)); SerdNode* hello2 = serd_new_string("hello\""); + assert(!serd_new_typed_literal("bad type", hello2)); + assert(serd_node_get_length(hello2) == 6 && serd_node_get_flags(hello2) == SERD_HAS_QUOTE && !strcmp(serd_node_get_string(hello2), "hello\"")); @@ -422,6 +424,10 @@ test_literal(void) SerdNode* hello3 = serd_new_plain_literal("hello\"", NULL); assert(serd_node_equals(hello2, hello3)); + SerdNode* hello4 = serd_new_typed_literal("hello\"", NULL); + assert(serd_node_equals(hello4, hello2)); + + serd_node_free(hello4); serd_node_free(hello3); serd_node_free(hello2); |