diff options
Diffstat (limited to 'test/test_uri.c')
-rw-r--r-- | test/test_uri.c | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/test/test_uri.c b/test/test_uri.c index d0dba037..ea70508b 100644 --- a/test/test_uri.c +++ b/test/test_uri.c @@ -35,7 +35,9 @@ test_file_uri(const char* hostname, expected_path = path; } - SerdNode* node = serd_new_file_uri(path, hostname, 0); + SerdNode* node = + serd_new_file_uri(SERD_MEASURE_STRING(path), SERD_MEASURE_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); @@ -143,7 +145,7 @@ check_rel_uri(const char* uri_string, SerdNode* const rel = is_within ? serd_new_parsed_uri(serd_relative_uri(uri, base_uri)) - : serd_new_uri(uri_string); + : serd_new_uri(SERD_MEASURE_STRING(uri_string)); const int ret = strcmp(serd_node_string(rel), expected); serd_node_free(rel); @@ -153,8 +155,11 @@ check_rel_uri(const char* uri_string, static void test_relative_uri(void) { - SerdNode* const root = serd_new_uri("http://example.org/a/b/ignored"); - SerdNode* const base = serd_new_uri("http://example.org/a/b/c/"); + SerdNode* const root = + serd_new_uri(SERD_STATIC_STRING("http://example.org/a/b/ignored")); + + SerdNode* const base = + serd_new_uri(SERD_STATIC_STRING("http://example.org/a/b/c/")); check_rel_uri("http://example.org/a/b/c/foo", base, NULL, "foo"); check_rel_uri("http://example.org/a/", base, NULL, "../../"); |