aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_reader_writer.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_reader_writer.c')
-rw-r--r--test/test_reader_writer.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/test/test_reader_writer.c b/test/test_reader_writer.c
index 7a57daed..1858d570 100644
--- a/test/test_reader_writer.c
+++ b/test/test_reader_writer.c
@@ -14,13 +14,13 @@
#include "serd/reader.h"
#include "serd/sink.h"
#include "serd/status.h"
-#include "serd/string_view.h"
#include "serd/syntax.h"
#include "serd/world.h"
#include "serd/writer.h"
#include "zix/allocator.h"
#include "zix/filesystem.h"
#include "zix/path.h"
+#include "zix/string_view.h"
#include <assert.h>
#include <errno.h>
@@ -110,7 +110,7 @@ test_write_errors(void)
ctx.n_written = 0;
ctx.error_offset = o;
- SerdEnv* const env = serd_env_new(NULL, serd_empty_string());
+ SerdEnv* const env = serd_env_new(NULL, zix_empty_string());
SerdOutputStream out =
serd_open_output_stream(faulty_sink, NULL, NULL, &ctx);
@@ -144,7 +144,7 @@ test_writer(const char* const path)
{
SerdWorld* world = serd_world_new(NULL);
SerdNodes* nodes = serd_world_nodes(world);
- SerdEnv* env = serd_env_new(NULL, serd_empty_string());
+ SerdEnv* env = serd_env_new(NULL, zix_empty_string());
SerdOutputStream output = serd_open_output_file(path);
@@ -161,7 +161,7 @@ test_writer(const char* const path)
assert(serd_sink_write_end(iface, lit));
static const uint8_t bad_buf[] = {0xEF, 0xBF, 0xBD, 0};
- const SerdStringView bad_buf_view = {(const char*)bad_buf, 3};
+ const ZixStringView bad_buf_view = {(const char*)bad_buf, 3};
const SerdNode* s =
serd_nodes_get(nodes, serd_a_uri_string("http://example.org"));
@@ -177,15 +177,16 @@ test_writer(const char* const path)
assert(serd_sink_write(iface, 0, junk[i][0], junk[i][1], junk[i][2], NULL));
}
- const SerdStringView urn_Type = serd_string("urn:Type");
- const SerdStringView en = serd_string("en");
- const SerdNode* const o = serd_nodes_get(nodes, serd_a_string("o"));
+ static const ZixStringView urn_Type = ZIX_STATIC_STRING("urn:Type");
+ static const ZixStringView en = ZIX_STATIC_STRING("en");
+
+ const SerdNode* const o = serd_nodes_get(nodes, serd_a_string("o"));
const SerdNode* const t =
- serd_nodes_get(nodes, serd_a_typed_literal(serd_string("t"), urn_Type));
+ serd_nodes_get(nodes, serd_a_typed_literal(zix_string("t"), urn_Type));
const SerdNode* const l =
- serd_nodes_get(nodes, serd_a_plain_literal(serd_string("l"), en));
+ serd_nodes_get(nodes, serd_a_plain_literal(zix_string("l"), en));
const SerdNode* good[][3] = {{s, p, o}, {s, p, t}, {s, p, l}};
@@ -246,7 +247,7 @@ test_reader(const char* path)
SerdSink* const sink = serd_sink_new(NULL, &rt, test_sink, NULL);
assert(sink);
- SerdEnv* const env = serd_env_new(NULL, serd_empty_string());
+ SerdEnv* const env = serd_env_new(NULL, zix_empty_string());
assert(env);
// Test that too little stack space fails gracefully