aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-04-29 18:36:11 +0200
committerDavid Robillard <d@drobilla.net>2018-05-27 18:23:15 +0200
commit8d1dcc05f7072651c0056221d00d8f1bf3fb80a1 (patch)
tree4e06a8ed7440c3f8554ef15e96a605507c4cbb25 /tests
parentb81b27fd762c3a3880070277a6d563a1c6913c1a (diff)
downloadserd-8d1dcc05f7072651c0056221d00d8f1bf3fb80a1.tar.gz
serd-8d1dcc05f7072651c0056221d00d8f1bf3fb80a1.tar.bz2
serd-8d1dcc05f7072651c0056221d00d8f1bf3fb80a1.zip
Add blank node API
Diffstat (limited to 'tests')
-rw-r--r--tests/serd_test.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index a7008e9f..5b60a03c 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -409,6 +409,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();