diff options
Diffstat (limited to 'test/test_reader.c')
-rw-r--r-- | test/test_reader.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/test/test_reader.c b/test/test_reader.c index 3d59af8e..325f8c23 100644 --- a/test/test_reader.c +++ b/test/test_reader.c @@ -16,13 +16,13 @@ #include "serd/statement.h" #include "serd/status.h" #include "serd/stream.h" -#include "serd/string_view.h" #include "serd/syntax.h" #include "serd/world.h" #include "zix/allocator.h" #include "zix/attributes.h" #include "zix/filesystem.h" #include "zix/path.h" +#include "zix/string_view.h" #ifdef _WIN32 # include <windows.h> @@ -69,7 +69,7 @@ test_new_failed_alloc(void) SerdFailingAllocator allocator = serd_failing_allocator(); SerdWorld* const world = serd_world_new(&allocator.base); - SerdEnv* const env = serd_env_new(&allocator.base, serd_empty_string()); + SerdEnv* const env = serd_env_new(&allocator.base, zix_empty_string()); size_t ignored = 0U; SerdSink* const sink = serd_sink_new(&allocator.base, &ignored, test_sink, NULL); @@ -105,7 +105,7 @@ test_start_failed_alloc(const char* const path) fseek(f, 0L, SEEK_SET); SerdWorld* world = serd_world_new(&allocator.base); - SerdEnv* env = serd_env_new(&allocator.base, serd_empty_string()); + SerdEnv* env = serd_env_new(&allocator.base, zix_empty_string()); size_t ignored = 0U; SerdSink* sink = serd_sink_new(&allocator.base, &ignored, test_sink, NULL); SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0U, env, sink); @@ -175,8 +175,9 @@ test_prepare_error(const char* const 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()); SerdReader* const reader = serd_reader_new(world, SERD_TURTLE, 0, env, sink); + assert(reader); SerdInputStream in = @@ -206,8 +207,9 @@ test_read_string(void) SerdSink* 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()); SerdReader* const reader = serd_reader_new(world, SERD_TURTLE, 0U, env, sink); + assert(reader); static const char* const string1 = @@ -307,7 +309,7 @@ test_read_eof_by_page(const char* const path) SerdWorld* const world = serd_world_new(NULL); ReaderTest rt = {0, 0, 0, 0}; SerdSink* const sink = serd_sink_new(NULL, &rt, test_sink, NULL); - SerdEnv* const env = serd_env_new(NULL, serd_empty_string()); + SerdEnv* const env = serd_env_new(NULL, zix_empty_string()); SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0U, env, sink); SerdInputStream in = @@ -335,7 +337,7 @@ test_read_eof_by_byte(void) SerdWorld* const world = serd_world_new(NULL); ReaderTest rt = {0, 0, 0, 0}; SerdSink* const sink = serd_sink_new(NULL, &rt, test_sink, NULL); - SerdEnv* const env = serd_env_new(NULL, serd_empty_string()); + SerdEnv* const env = serd_env_new(NULL, zix_empty_string()); SerdReader* reader = serd_reader_new(world, SERD_TURTLE, 0U, env, sink); size_t n_reads = 0U; @@ -387,7 +389,7 @@ test_read_nquads_chunks(const char* const 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); SerdReader* const reader = serd_reader_new(world, SERD_TURTLE, 0U, env, sink); @@ -473,7 +475,7 @@ test_read_turtle_chunks(const char* const 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); SerdReader* const reader = serd_reader_new(world, SERD_TURTLE, 0U, env, sink); @@ -562,7 +564,7 @@ test_read_empty(const char* const 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); SerdReader* const reader = @@ -617,8 +619,8 @@ test_error_cursor(void) SerdNodes* const nodes = serd_world_nodes(world); bool called = false; SerdSink* const sink = serd_sink_new(NULL, &called, check_cursor, NULL); - SerdEnv* const env = serd_env_new(NULL, serd_empty_string()); - SerdReader* const reader = serd_reader_new(world, SERD_TURTLE, 0U, env, sink); + SerdEnv* const env = serd_env_new(NULL, zix_empty_string()); + SerdReader* const reader = serd_reader_new(world, SERD_TURTLE, 0, env, sink); assert(sink); assert(reader); |