aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_terse_write.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_terse_write.c')
-rw-r--r--test/test_terse_write.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/test/test_terse_write.c b/test/test_terse_write.c
index 39e3767a..0bdb0280 100644
--- a/test/test_terse_write.c
+++ b/test/test_terse_write.c
@@ -5,6 +5,7 @@
#include "serd/buffer.h"
#include "serd/env.h"
+#include "serd/memory.h"
#include "serd/node.h"
#include "serd/output_stream.h"
#include "serd/sink.h"
@@ -16,7 +17,6 @@
#include <assert.h>
#include <stdio.h>
-#include <stdlib.h>
#include <string.h>
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
@@ -39,20 +39,20 @@ check_output(SerdWriter* writer, SerdBuffer* buffer, const char* expected)
static int
test(void)
{
- SerdBuffer buffer = {NULL, 0};
- SerdWorld* world = serd_world_new();
- SerdEnv* env = serd_env_new(serd_empty_string());
+ SerdBuffer buffer = {NULL, NULL, 0};
+ SerdWorld* world = serd_world_new(NULL);
+ SerdEnv* env = serd_env_new(NULL, serd_empty_string());
- SerdNode* b1 = serd_new_blank(serd_string("b1"));
- SerdNode* l1 = serd_new_blank(serd_string("l1"));
- SerdNode* l2 = serd_new_blank(serd_string("l2"));
- SerdNode* s1 = serd_new_string(serd_string("s1"));
- SerdNode* s2 = serd_new_string(serd_string("s2"));
+ SerdNode* b1 = serd_new_blank(NULL, serd_string("b1"));
+ SerdNode* l1 = serd_new_blank(NULL, serd_string("l1"));
+ SerdNode* l2 = serd_new_blank(NULL, serd_string("l2"));
+ SerdNode* s1 = serd_new_string(NULL, serd_string("s1"));
+ SerdNode* s2 = serd_new_string(NULL, serd_string("s2"));
- SerdNode* rdf_first = serd_new_uri(serd_string(NS_RDF "first"));
- SerdNode* rdf_value = serd_new_uri(serd_string(NS_RDF "value"));
- SerdNode* rdf_rest = serd_new_uri(serd_string(NS_RDF "rest"));
- SerdNode* rdf_nil = serd_new_uri(serd_string(NS_RDF "nil"));
+ SerdNode* rdf_first = serd_new_uri(NULL, serd_string(NS_RDF "first"));
+ SerdNode* rdf_value = serd_new_uri(NULL, serd_string(NS_RDF "value"));
+ SerdNode* rdf_rest = serd_new_uri(NULL, serd_string(NS_RDF "rest"));
+ SerdNode* rdf_nil = serd_new_uri(NULL, serd_string(NS_RDF "nil"));
serd_env_set_prefix(env, serd_string("rdf"), serd_string(NS_RDF));
@@ -91,19 +91,19 @@ test(void)
check_output(writer, &buffer, "[] rdf:value ( \"s1\" \"s2\" ) .\n");
serd_writer_free(writer);
- serd_node_free(rdf_nil);
- serd_node_free(rdf_rest);
- serd_node_free(rdf_value);
- serd_node_free(rdf_first);
- serd_node_free(s2);
- serd_node_free(s1);
- serd_node_free(l2);
- serd_node_free(l1);
- serd_node_free(b1);
+ serd_node_free(NULL, rdf_nil);
+ serd_node_free(NULL, rdf_rest);
+ serd_node_free(NULL, rdf_value);
+ serd_node_free(NULL, rdf_first);
+ serd_node_free(NULL, s2);
+ serd_node_free(NULL, s1);
+ serd_node_free(NULL, l2);
+ serd_node_free(NULL, l1);
+ serd_node_free(NULL, b1);
serd_close_output(&output);
+ serd_free(NULL, buffer.buf);
serd_env_free(env);
serd_world_free(world);
- free(buffer.buf);
return 0;
}