diff options
Diffstat (limited to 'test/test_uri.c')
-rw-r--r-- | test/test_uri.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/test/test_uri.c b/test/test_uri.c index 65e12490..d3ba5514 100644 --- a/test/test_uri.c +++ b/test/test_uri.c @@ -44,7 +44,7 @@ test_file_uri(const char* const hostname, expected_path = path; } - SerdNode node = serd_node_new_file_uri(path, hostname, 0); + SerdNode node = serd_new_file_uri(path, hostname, 0); char* out_hostname = NULL; char* out_path = serd_file_uri_parse(node.buf, &out_hostname); assert(!strcmp(node.buf, expected_uri)); @@ -114,14 +114,14 @@ test_uri_parsing(void) static void test_uri_from_string(void) { - SerdNode nonsense = serd_node_new_uri_from_string(NULL, NULL, NULL); + SerdNode nonsense = serd_new_uri_from_string(NULL, NULL, NULL); assert(nonsense.type == SERD_NOTHING); SerdURIView base_uri; SerdNode base = - serd_node_new_uri_from_string("http://example.org/", NULL, &base_uri); - SerdNode nil = serd_node_new_uri_from_string(NULL, &base_uri, NULL); - SerdNode nil2 = serd_node_new_uri_from_string("", &base_uri, NULL); + serd_new_uri_from_string("http://example.org/", NULL, &base_uri); + SerdNode nil = serd_new_uri_from_string(NULL, &base_uri, NULL); + SerdNode nil2 = serd_new_uri_from_string("", &base_uri, NULL); assert(nil.type == SERD_URI); assert(!strcmp(nil.buf, base.buf)); assert(nil2.type == SERD_URI); @@ -154,19 +154,18 @@ check_relative_uri(const char* const uri_string, SerdURIView base = SERD_URI_NULL; SerdURIView result = SERD_URI_NULL; - SerdNode uri_node = serd_node_new_uri_from_string(uri_string, NULL, &uri); - SerdNode base_node = serd_node_new_uri_from_string(base_string, NULL, &base); + SerdNode uri_node = serd_new_uri_from_string(uri_string, NULL, &uri); + SerdNode base_node = serd_new_uri_from_string(base_string, NULL, &base); SerdNode result_node = SERD_NODE_NULL; if (root_string) { - SerdURIView root = SERD_URI_NULL; - SerdNode root_node = - serd_node_new_uri_from_string(root_string, NULL, &root); + SerdURIView root = SERD_URI_NULL; + SerdNode root_node = serd_new_uri_from_string(root_string, NULL, &root); - result_node = serd_node_new_relative_uri(&uri, &base, &root, &result); + result_node = serd_new_relative_uri(&uri, &base, &root, &result); serd_node_free(&root_node); } else { - result_node = serd_node_new_relative_uri(&uri, &base, NULL, &result); + result_node = serd_new_relative_uri(&uri, &base, NULL, &result); } assert(!strcmp((const char*)result_node.buf, expected_string)); |