diff options
author | David Robillard <d@drobilla.net> | 2018-04-29 18:29:03 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 16:27:02 -0500 |
commit | 5c02da92038072f28408854e862fc2d4edf765d4 (patch) | |
tree | 34577415801279981b626b18c1dc69dc79afea7f /test/test_uri.c | |
parent | 672e90382da08efa8f593fdc9081e31d0e548fa0 (diff) | |
download | serd-5c02da92038072f28408854e862fc2d4edf765d4.tar.gz serd-5c02da92038072f28408854e862fc2d4edf765d4.tar.bz2 serd-5c02da92038072f28408854e862fc2d4edf765d4.zip |
Simplify node construction API
Diffstat (limited to 'test/test_uri.c')
-rw-r--r-- | test/test_uri.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/test/test_uri.c b/test/test_uri.c index 3fe0ebd5..74b732fd 100644 --- a/test/test_uri.c +++ b/test/test_uri.c @@ -44,7 +44,8 @@ test_file_uri(const char* const hostname, expected_path = path; } - SerdNode* node = serd_new_file_uri(path, hostname, 0); + SerdNode* node = serd_new_file_uri(serd_string(path), serd_string(hostname)); + const char* node_str = serd_node_string(node); char* out_hostname = NULL; char* out_path = serd_parse_file_uri(node_str, &out_hostname); @@ -193,22 +194,21 @@ check_relative_uri(const char* const uri_string, assert(base_string); assert(expected_string); - SerdNode* const uri_node = serd_new_uri(uri_string); + SerdNode* const uri_node = serd_new_uri(serd_string(uri_string)); const SerdURIView uri = serd_node_uri_view(uri_node); - SerdNode* const base_node = serd_new_uri(base_string); + SerdNode* const base_node = serd_new_uri(serd_string(base_string)); const SerdURIView base = serd_node_uri_view(base_node); SerdNode* result_node = NULL; if (!root_string) { result_node = serd_new_parsed_uri(serd_relative_uri(uri, base)); } else { - SerdNode* const root_node = serd_new_uri(root_string); + SerdNode* const root_node = serd_new_uri(serd_string(root_string)); const SerdURIView root = serd_node_uri_view(root_node); result_node = serd_uri_is_within(uri, root) ? serd_new_parsed_uri(serd_relative_uri(uri, base)) - : serd_new_uri(uri_string); - + : serd_new_uri(serd_string(uri_string)); serd_node_free(root_node); } |