aboutsummaryrefslogtreecommitdiffstats
path: root/tests/serd_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/serd_test.c')
-rw-r--r--tests/serd_test.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index 0a65fbe9..168c4ee8 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -188,6 +188,23 @@ test_read_chunks(void)
serd_world_free(world);
}
+static int
+test_get_blank(void)
+{
+ SerdWorld* world = serd_world_new();
+ char expected[8];
+
+ for (unsigned i = 0; i < 32; ++i) {
+ const SerdNode* blank = serd_world_get_blank(world);
+
+ snprintf(expected, sizeof(expected), "b%u", i + 1);
+ assert(!strcmp(serd_node_string(blank), expected));
+ }
+
+ serd_world_free(world);
+ return 0;
+}
+
static void
test_read_string(void)
{
@@ -742,6 +759,7 @@ main(void)
test_blank();
test_read_chunks();
test_read_string();
+ test_get_blank();
const char* const path = "serd_test.ttl";
test_writer(path);