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>2020-10-27 13:13:58 +0100
commit5d65a0b7b687ffbbd624d75b42ac3336ce353c39 (patch)
tree2d99317b187bd28d628c6a45ee620e39c68a0d0d /tests/serd_test.c
parent48a9bed4cf7dc2b81acb6c645f7d053e1b9ead6d (diff)
downloadserd-5d65a0b7b687ffbbd624d75b42ac3336ce353c39.tar.gz
serd-5d65a0b7b687ffbbd624d75b42ac3336ce353c39.tar.bz2
serd-5d65a0b7b687ffbbd624d75b42ac3336ce353c39.zip
Add blank node API
Diffstat (limited to 'tests/serd_test.c')
-rw-r--r--tests/serd_test.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index a99ce678..15a205db 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -501,6 +501,18 @@ test_relative_uri(void)
}
static void
+test_blank(void)
+{
+ assert(!serd_node_new_blank(NULL));
+
+ SerdNode* blank = serd_node_new_blank("b0");
+ assert(serd_node_length(blank) == 2);
+ assert(serd_node_flags(blank) == 0);
+ assert(!strcmp(serd_node_string(blank), "b0"));
+ serd_node_free(blank);
+}
+
+static void
test_writer(const char* const path)
{
FILE* fd = fopen(path, "wb");
@@ -698,6 +710,7 @@ main(void)
test_literal();
test_uri_from_string();
test_relative_uri();
+ test_blank();
test_read_chunks();
test_read_string();