diff options
author | David Robillard <d@drobilla.net> | 2018-12-26 11:54:21 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2019-04-13 19:48:23 +0200 |
commit | b30f33eee72c8900228d4406eecce0b404b6e827 (patch) | |
tree | 81bfbe1f5b7b28909777d54fbeec6d5963babdd0 /tests | |
parent | 5443876d8e15c6ad011ede7d46ed36325a6cb282 (diff) | |
download | serd-b30f33eee72c8900228d4406eecce0b404b6e827.tar.gz serd-b30f33eee72c8900228d4406eecce0b404b6e827.tar.bz2 serd-b30f33eee72c8900228d4406eecce0b404b6e827.zip |
Add serd_new_boolean()
Diffstat (limited to 'tests')
-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 e3289a17..797a489a 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)); |