aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test_node.c6
-rw-r--r--test/test_uri.c23
2 files changed, 14 insertions, 15 deletions
diff --git a/test/test_node.c b/test/test_node.c
index a1473e7a..21ef6feb 100644
--- a/test/test_node.c
+++ b/test/test_node.c
@@ -80,7 +80,7 @@ test_double_to_node(void)
NULL};
for (size_t i = 0; i < sizeof(dbl_test_nums) / sizeof(double); ++i) {
- SerdNode node = serd_node_new_decimal(dbl_test_nums[i], 8);
+ SerdNode node = serd_new_decimal(dbl_test_nums[i], 8);
const bool pass = (node.buf && dbl_test_strs[i])
? !strcmp(node.buf, dbl_test_strs[i])
: (node.buf == dbl_test_strs[i]);
@@ -102,7 +102,7 @@ test_integer_to_node(void)
"0", "0", "-23", "23", "-12340", "1000", "-1000"};
for (size_t i = 0; i < N_TEST_NUMS; ++i) {
- SerdNode node = serd_node_new_integer(int_test_nums[i]);
+ SerdNode node = serd_new_integer(int_test_nums[i]);
assert(!strcmp(node.buf, int_test_strs[i]));
assert(node.n_bytes == strlen(node.buf));
serd_node_free(&node);
@@ -120,7 +120,7 @@ test_blob_to_node(void)
data[i] = (uint8_t)((size + i) % 256);
}
- SerdNode blob = serd_node_new_blob(data, size, size % 5);
+ SerdNode blob = serd_new_blob(data, size, size % 5);
assert(blob.n_bytes == strlen(blob.buf));
diff --git a/test/test_uri.c b/test/test_uri.c
index 65e12490..d3ba5514 100644
--- a/test/test_uri.c
+++ b/test/test_uri.c
@@ -44,7 +44,7 @@ test_file_uri(const char* const hostname,
expected_path = path;
}
- SerdNode node = serd_node_new_file_uri(path, hostname, 0);
+ SerdNode node = serd_new_file_uri(path, hostname, 0);
char* out_hostname = NULL;
char* out_path = serd_file_uri_parse(node.buf, &out_hostname);
assert(!strcmp(node.buf, expected_uri));
@@ -114,14 +114,14 @@ test_uri_parsing(void)
static void
test_uri_from_string(void)
{
- SerdNode nonsense = serd_node_new_uri_from_string(NULL, NULL, NULL);
+ SerdNode nonsense = serd_new_uri_from_string(NULL, NULL, NULL);
assert(nonsense.type == SERD_NOTHING);
SerdURIView base_uri;
SerdNode base =
- serd_node_new_uri_from_string("http://example.org/", NULL, &base_uri);
- SerdNode nil = serd_node_new_uri_from_string(NULL, &base_uri, NULL);
- SerdNode nil2 = serd_node_new_uri_from_string("", &base_uri, NULL);
+ serd_new_uri_from_string("http://example.org/", NULL, &base_uri);
+ SerdNode nil = serd_new_uri_from_string(NULL, &base_uri, NULL);
+ SerdNode nil2 = serd_new_uri_from_string("", &base_uri, NULL);
assert(nil.type == SERD_URI);
assert(!strcmp(nil.buf, base.buf));
assert(nil2.type == SERD_URI);
@@ -154,19 +154,18 @@ check_relative_uri(const char* const uri_string,
SerdURIView base = SERD_URI_NULL;
SerdURIView result = SERD_URI_NULL;
- SerdNode uri_node = serd_node_new_uri_from_string(uri_string, NULL, &uri);
- SerdNode base_node = serd_node_new_uri_from_string(base_string, NULL, &base);
+ SerdNode uri_node = serd_new_uri_from_string(uri_string, NULL, &uri);
+ SerdNode base_node = serd_new_uri_from_string(base_string, NULL, &base);
SerdNode result_node = SERD_NODE_NULL;
if (root_string) {
- SerdURIView root = SERD_URI_NULL;
- SerdNode root_node =
- serd_node_new_uri_from_string(root_string, NULL, &root);
+ SerdURIView root = SERD_URI_NULL;
+ SerdNode root_node = serd_new_uri_from_string(root_string, NULL, &root);
- result_node = serd_node_new_relative_uri(&uri, &base, &root, &result);
+ result_node = serd_new_relative_uri(&uri, &base, &root, &result);
serd_node_free(&root_node);
} else {
- result_node = serd_node_new_relative_uri(&uri, &base, NULL, &result);
+ result_node = serd_new_relative_uri(&uri, &base, NULL, &result);
}
assert(!strcmp((const char*)result_node.buf, expected_string));