diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/serd_test.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c index 3b1c786c..b206886b 100644 --- a/tests/serd_test.c +++ b/tests/serd_test.c @@ -443,6 +443,20 @@ main(void) serd_node_free(rel); serd_node_free(base); + // Test serd_node_new_blank + + if (serd_node_new_blank(NULL)) { + FAIL("Successfully created blank node from NULL string\n"); + } + + SerdNode* blank = serd_node_new_blank("b0"); + if (serd_node_get_length(blank) != 2 || + serd_node_get_flags(blank) != 0 || + strcmp(serd_node_get_string(blank), "b0")) { + FAILF("Bad blank node %s\n", serd_node_get_string(blank)); + } + serd_node_free(blank); + // Test SerdEnv SerdWorld* world = serd_world_new(); |