aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_canon.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_canon.c')
-rw-r--r--test/test_canon.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/test/test_canon.c b/test/test_canon.c
index 89d1312b..ce3cfc67 100644
--- a/test/test_canon.c
+++ b/test/test_canon.c
@@ -11,8 +11,8 @@
#include "serd/nodes.h"
#include "serd/sink.h"
#include "serd/status.h"
-#include "serd/string_view.h"
#include "serd/world.h"
+#include "zix/string_view.h"
#include <assert.h>
#include <stddef.h>
@@ -56,11 +56,13 @@ test_new_failed_alloc(void)
static void
test_write_failed_alloc(void)
{
- const SerdStringView s_string = serd_string("http://example.org/s");
- const SerdStringView p_string = serd_string("http://example.org/p");
- const SerdStringView o_string = serd_string("012.340");
- const SerdStringView xsd_float =
- serd_string("http://www.w3.org/2001/XMLSchema#float");
+#define NS_EG "http://example.org/s"
+#define NS_XSD "http://www.w3.org/2001/XMLSchema#"
+
+ static const ZixStringView s_string = ZIX_STATIC_STRING(NS_EG "s");
+ static const ZixStringView p_string = ZIX_STATIC_STRING(NS_EG "p");
+ static const ZixStringView o_string = ZIX_STATIC_STRING("012.340");
+ static const ZixStringView xsd_float = ZIX_STATIC_STRING(NS_XSD "float");
SerdFailingAllocator allocator = serd_failing_allocator();
SerdWorld* const world = serd_world_new(&allocator.base);
@@ -92,6 +94,9 @@ test_write_failed_alloc(void)
serd_sink_free(target);
serd_nodes_free(nodes);
serd_world_free(world);
+
+#undef NS_XSD
+#undef NS_EG
}
int