aboutsummaryrefslogtreecommitdiffstats
path: root/tests/serd_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-04-29 18:36:11 +0200
committerDavid Robillard <d@drobilla.net>2018-12-30 17:58:17 -0500
commit7b2134120a106997b1d246798b73d6d64bd4e83e (patch)
treeb81cad6a4e1eee2d6c87d72184fc55b4fa66f5dc /tests/serd_test.c
parent4057fae5851aafbdcd42c99f86f73f985a55ab41 (diff)
downloadserd-7b2134120a106997b1d246798b73d6d64bd4e83e.tar.gz
serd-7b2134120a106997b1d246798b73d6d64bd4e83e.tar.bz2
serd-7b2134120a106997b1d246798b73d6d64bd4e83e.zip
Add blank node API
Diffstat (limited to 'tests/serd_test.c')
-rw-r--r--tests/serd_test.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index 0049dbca..da567a35 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -366,6 +366,16 @@ main(void)
serd_node_free(rel);
serd_node_free(base);
+ // Test serd_node_new_blank
+
+ assert(!serd_node_new_blank(NULL));
+
+ SerdNode* blank = serd_node_new_blank("b0");
+ assert(serd_node_get_length(blank) == 2);
+ assert(serd_node_get_flags(blank) == 0);
+ assert(!strcmp(serd_node_get_string(blank), "b0"));
+ serd_node_free(blank);
+
// Test SerdEnv
SerdWorld* world = serd_world_new();