diff options
author | David Robillard <d@drobilla.net> | 2022-12-19 17:55:02 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:08 -0500 |
commit | 0f9816d67bc67a396607291f845ca2a33c2285a7 (patch) | |
tree | b31fd1b344305dc984a2109084fa183573a0ae43 /test/test_model.c | |
parent | 258ea2ff59bbd2127ea446cf4b9676ad3d7fe53d (diff) | |
download | serd-0f9816d67bc67a396607291f845ca2a33c2285a7.tar.gz serd-0f9816d67bc67a396607291f845ca2a33c2285a7.tar.bz2 serd-0f9816d67bc67a396607291f845ca2a33c2285a7.zip |
Use ZixAllocator directly
Diffstat (limited to 'test/test_model.c')
-rw-r--r-- | test/test_model.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/test/test_model.c b/test/test_model.c index 2e3a7847..f1a8d5cb 100644 --- a/test/test_model.c +++ b/test/test_model.c @@ -12,7 +12,6 @@ #include "serd/env.h" #include "serd/inserter.h" #include "serd/log.h" -#include "serd/memory.h" #include "serd/model.h" #include "serd/node.h" #include "serd/nodes.h" @@ -23,6 +22,7 @@ #include "serd/syntax.h" #include "serd/world.h" #include "serd/writer.h" +#include "zix/allocator.h" #include "zix/attributes.h" #include "zix/string_view.h" @@ -156,8 +156,8 @@ test_read(SerdWorld* world, const SerdNode* g, const unsigned n_quads) { - SerdAllocator* const allocator = serd_default_allocator(); - SerdNodes* const nodes = serd_nodes_new(allocator); + ZixAllocator* const allocator = zix_default_allocator(); + SerdNodes* const nodes = serd_nodes_new(allocator); SerdCursor* cursor = serd_model_begin(NULL, model); const SerdStatement* prev = NULL; @@ -604,10 +604,10 @@ test_inserter(SerdWorld* world, const unsigned n_quads) { (void)n_quads; - SerdAllocator* const allocator = serd_default_allocator(); - SerdNodes* const nodes = serd_nodes_new(allocator); - SerdModel* const model = serd_model_new(world, SERD_ORDER_SPO, 0U); - SerdSink* const inserter = serd_inserter_new(model, NULL); + ZixAllocator* const allocator = zix_default_allocator(); + SerdNodes* const nodes = serd_nodes_new(allocator); + SerdModel* const model = serd_model_new(world, SERD_ORDER_SPO, 0U); + SerdSink* const inserter = serd_inserter_new(model, NULL); const SerdNode* const s = serd_nodes_get(nodes, serd_a_uri_string("http://example.org/s")); @@ -673,7 +673,7 @@ test_add_erase(SerdWorld* world, const unsigned n_quads) { (void)n_quads; - SerdAllocator* const allocator = serd_default_allocator(); + ZixAllocator* const allocator = zix_default_allocator(); SerdNodes* const nodes = serd_nodes_new(allocator); SerdModel* const model = serd_model_new(world, SERD_ORDER_SPO, 0U); @@ -713,8 +713,8 @@ test_add_bad_statement(SerdWorld* world, const unsigned n_quads) { (void)n_quads; - SerdAllocator* const allocator = serd_world_allocator(world); - SerdNodes* const nodes = serd_nodes_new(allocator); + ZixAllocator* const allocator = serd_world_allocator(world); + SerdNodes* const nodes = serd_nodes_new(allocator); const SerdNode* s = serd_nodes_get(nodes, serd_a_uri_string("urn:s")); const SerdNode* p = serd_nodes_get(nodes, serd_a_uri_string("urn:p")); @@ -1089,7 +1089,7 @@ test_write_flat_range(SerdWorld* world, const unsigned n_quads) { (void)n_quads; - SerdAllocator* const alloc = serd_world_allocator(world); + ZixAllocator* const alloc = serd_world_allocator(world); SerdModel* model = serd_model_new(world, SERD_ORDER_SPO, SERD_STORE_GRAPHS); SerdNodes* nodes = serd_nodes_new(alloc); @@ -1136,7 +1136,7 @@ test_write_flat_range(SerdWorld* world, const unsigned n_quads) assert(str); assert(!strcmp(str, expected)); - serd_free(NULL, buffer.buf); + zix_free(NULL, buffer.buf); serd_writer_free(writer); serd_model_free(model); serd_env_free(env); @@ -1149,7 +1149,7 @@ test_write_bad_list(SerdWorld* world, const unsigned n_quads) { (void)n_quads; - SerdAllocator* const alloc = serd_world_allocator(world); + ZixAllocator* const alloc = serd_world_allocator(world); SerdModel* model = serd_model_new(world, SERD_ORDER_SPO, SERD_STORE_GRAPHS); SerdNodes* nodes = serd_nodes_new(alloc); @@ -1212,7 +1212,7 @@ test_write_bad_list(SerdWorld* world, const unsigned n_quads) assert(str); assert(!strcmp(str, expected)); - serd_free(NULL, buffer.buf); + zix_free(NULL, buffer.buf); serd_writer_free(writer); serd_close_output(&out); serd_model_free(model); @@ -1226,7 +1226,7 @@ test_write_infinite_list(SerdWorld* world, const unsigned n_quads) { (void)n_quads; - SerdAllocator* const alloc = serd_world_allocator(world); + ZixAllocator* const alloc = serd_world_allocator(world); SerdModel* model = serd_model_new(world, SERD_ORDER_SPO, SERD_STORE_GRAPHS); SerdNodes* nodes = serd_nodes_new(alloc); @@ -1284,7 +1284,7 @@ test_write_infinite_list(SerdWorld* world, const unsigned n_quads) assert(str); assert(!strcmp(str, expected)); - serd_free(NULL, buffer.buf); + zix_free(NULL, buffer.buf); serd_writer_free(writer); serd_close_output(&out); serd_model_free(model); @@ -1317,7 +1317,7 @@ test_write_error_in_list_subject(SerdWorld* world, const unsigned n_quads) { (void)n_quads; - SerdAllocator* const alloc = serd_world_allocator(world); + ZixAllocator* const alloc = serd_world_allocator(world); serd_set_log_func(world, expected_error, NULL); @@ -1377,7 +1377,7 @@ test_write_error_in_list_object(SerdWorld* world, const unsigned n_quads) { (void)n_quads; - SerdAllocator* const alloc = serd_world_allocator(world); + ZixAllocator* const alloc = serd_world_allocator(world); serd_set_log_func(world, expected_error, NULL); |