From 77eebec72c0507309ce89f8cdaceff4adfd147cf Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 12 Jan 2022 16:18:17 -0500 Subject: Add serd_nodes_file_uri() --- test/test_uri.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'test/test_uri.c') diff --git a/test/test_uri.c b/test/test_uri.c index 2b0c9b16..ec102d6f 100644 --- a/test/test_uri.c +++ b/test/test_uri.c @@ -85,12 +85,14 @@ test_file_uri(const char* const hostname, expected_path = path; } - SerdNode* node = - serd_new_file_uri(NULL, SERD_STRING(path), SERD_OPTIONAL_STRING(hostname)); + SerdNodes* const nodes = serd_nodes_new(NULL); + + const SerdNode* node = serd_nodes_file_uri( + nodes, SERD_STRING(path), SERD_OPTIONAL_STRING(hostname)); const char* node_str = serd_node_string(node); char* out_hostname = NULL; - char* out_path = serd_parse_file_uri(NULL, node_str, &out_hostname); + char* const out_path = serd_parse_file_uri(NULL, node_str, &out_hostname); assert(!strcmp(node_str, expected_uri)); assert((hostname && out_hostname) || (!hostname && !out_hostname)); @@ -99,7 +101,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 -- cgit v1.2.1