aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_uri.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_uri.c')
-rw-r--r--test/test_uri.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/test_uri.c b/test/test_uri.c
index 7a15ffb8..294b00ec 100644
--- a/test/test_uri.c
+++ b/test/test_uri.c
@@ -7,6 +7,7 @@
#include "serd/memory.h"
#include "serd/node.h"
+#include "serd/nodes.h"
#include "serd/string_view.h"
#include "serd/uri.h"
@@ -75,8 +76,10 @@ test_file_uri(const char* const hostname,
expected_path = path;
}
- SerdNode* node = serd_node_new(
- NULL, serd_a_file_uri(serd_string(path), serd_string(hostname)));
+ SerdNodes* const nodes = serd_nodes_new(NULL);
+
+ const SerdNode* node = serd_nodes_get(
+ nodes, serd_a_file_uri(serd_string(path), serd_string(hostname)));
const char* node_str = serd_node_string(node);
char* out_hostname = NULL;
@@ -89,7 +92,7 @@ test_file_uri(const char* const hostname,
serd_free(NULL, out_path);
serd_free(NULL, out_hostname);
- serd_node_free(NULL, node);
+ serd_nodes_free(nodes);
}
static void
@@ -231,6 +234,7 @@ check_relative_uri(const char* const uri_string,
const SerdURIView uri = serd_node_uri_view(uri_node);
SerdNode* const base_node =
serd_node_new(NULL, serd_a_uri_string(base_string));
+
const SerdURIView base = serd_node_uri_view(base_node);
SerdNode* result_node = NULL;
@@ -246,7 +250,6 @@ check_relative_uri(const char* const uri_string,
serd_uri_is_within(uri, root)
? serd_node_new(NULL, serd_a_parsed_uri(serd_relative_uri(uri, base)))
: serd_node_new(NULL, serd_a_uri_string(uri_string));
-
serd_node_free(NULL, root_node);
}