diff options
author | David Robillard <d@drobilla.net> | 2018-12-26 11:54:21 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-01-05 17:12:38 +0100 |
commit | 31b57fdf337fc906151bb597a0e6ceede374620b (patch) | |
tree | 6b825b63f26a2fc1b203ce1663e156c0b67f9609 /tests/serd_test.c | |
parent | d4e594b0825391db76d72fbf092451d86ebe66c2 (diff) | |
download | serd-31b57fdf337fc906151bb597a0e6ceede374620b.tar.gz serd-31b57fdf337fc906151bb597a0e6ceede374620b.tar.bz2 serd-31b57fdf337fc906151bb597a0e6ceede374620b.zip |
Add serd_new_boolean()
Diffstat (limited to 'tests/serd_test.c')
-rw-r--r-- | tests/serd_test.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c index ba4f170f..c009090e 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -203,6 +203,19 @@ main(void) serd_node_free(node); } + // Test serd_new_boolean + SerdNode* true_node = serd_new_boolean(true); + assert(!strcmp(serd_node_get_string(true_node), "true")); + assert(!strcmp(serd_node_get_string(serd_node_get_datatype(true_node)), + NS_XSD "boolean")); + serd_node_free(true_node); + + SerdNode* false_node = serd_new_boolean(false); + assert(!strcmp(serd_node_get_string(false_node), "false")); + assert(!strcmp(serd_node_get_string(serd_node_get_datatype(false_node)), + NS_XSD "boolean")); + serd_node_free(false_node); + // Test serd_new_blob assert(!serd_new_blob(NULL, 0, true, NULL)); assert(!serd_new_blob("data", 0, true, NULL)); |