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.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/tests/serd_test.c b/tests/serd_test.c
index 75f96489..2b50e647 100644
--- a/tests/serd_test.c
+++ b/tests/serd_test.c
@@ -401,8 +401,10 @@ static void test_literal(void)
"en"));
serd_node_free(hello_l);
- SerdNode* hello_dt = serd_node_new_literal(
- "hello_dt\"", "http://example.org/Thing", NULL);
+ SerdNode* eg_Thing = serd_node_new_uri_from_string(
+ "http://example.org/Thing", NULL, NULL);
+
+ SerdNode* hello_dt = serd_node_new_literal("hello_dt\"", eg_Thing, NULL);
assert(serd_node_get_length(hello_dt) == 9);
assert(!strcmp(serd_node_get_string(hello_dt), "hello_dt\""));
assert(serd_node_get_flags(hello_dt) ==
@@ -410,6 +412,7 @@ static void test_literal(void)
assert(!strcmp(serd_node_get_string(serd_node_get_datatype(hello_dt)),
"http://example.org/Thing"));
serd_node_free(hello_dt);
+ serd_node_free(eg_Thing);
}
static void
@@ -577,7 +580,9 @@ test_writer(const char* const path)
junk[i][0], junk[i][1], junk[i][2]));
}
- SerdNode* t = serd_node_new_literal((char*)buf, "urn:Type", NULL);
+ SerdNode* urn_Type = serd_node_new_uri_from_string("urn:Type", NULL, NULL);
+
+ SerdNode* t = serd_node_new_literal((char*)buf, urn_Type, NULL);
SerdNode* l = serd_node_new_literal((char*)buf, NULL, "en");
const SerdNode* good[][5] = { { s, p, o },
{ s, p, o },
@@ -615,6 +620,7 @@ test_writer(const char* const path)
serd_node_free(o);
serd_node_free(t);
serd_node_free(l);
+ serd_node_free(urn_Type);
// Test buffer sink
SerdBuffer buffer = { NULL, 0 };