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.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/test/test_uri.c b/test/test_uri.c
index b1af8a02..bf4fa0f3 100644
--- a/test/test_uri.c
+++ b/test/test_uri.c
@@ -8,8 +8,8 @@
#include "serd/memory.h"
#include "serd/node.h"
#include "serd/nodes.h"
-#include "serd/string_view.h"
#include "serd/uri.h"
+#include "zix/string_view.h"
#include <assert.h>
#include <stdbool.h>
@@ -79,7 +79,7 @@ test_file_uri(const char* const 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)));
+ nodes, serd_a_file_uri(zix_string(path), zix_string(hostname)));
const char* node_str = serd_node_string(node);
char* out_hostname = NULL;
@@ -164,7 +164,8 @@ test_uri_parsing(void)
static void
test_parse_uri(void)
{
- const SerdStringView base = serd_string("http://example.org/a/b/c/");
+ static const ZixStringView base =
+ ZIX_STATIC_STRING("http://example.org/a/b/c/");
const SerdURIView base_uri = serd_parse_uri(base.data);
const SerdURIView empty_uri = serd_parse_uri("");
@@ -215,7 +216,7 @@ test_is_within(void)
}
static inline bool
-chunk_equals(const SerdStringView* a, const SerdStringView* b)
+chunk_equals(const ZixStringView* a, const ZixStringView* b)
{
return (!a->length && !b->length && !a->data && !b->data) ||
(a->length && b->length && a->data && b->data &&
@@ -374,11 +375,11 @@ check_uri_string(const SerdURIView uri, const char* const expected)
static void
test_uri_resolution(void)
{
- const SerdStringView top = serd_string("http://example.org/t/");
- const SerdStringView base = serd_string("http://example.org/t/b/");
- const SerdStringView sub = serd_string("http://example.org/t/b/s");
- const SerdStringView deep = serd_string("http://example.org/t/b/s/d");
- const SerdStringView other = serd_string("http://example.org/o");
+ const ZixStringView top = ZIX_STATIC_STRING("http://example.org/t/");
+ const ZixStringView base = ZIX_STATIC_STRING("http://example.org/t/b/");
+ const ZixStringView sub = ZIX_STATIC_STRING("http://example.org/t/b/s");
+ const ZixStringView deep = ZIX_STATIC_STRING("http://example.org/t/b/s/d");
+ const ZixStringView other = ZIX_STATIC_STRING("http://example.org/o");
const SerdURIView top_uri = serd_parse_uri(top.data);
const SerdURIView base_uri = serd_parse_uri(base.data);