aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_statement.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2023-05-05 09:43:57 -0400
committerDavid Robillard <d@drobilla.net>2023-12-02 18:49:08 -0500
commit4711fdf527f416faee8ff19e15f050d4b48dcfb2 (patch)
tree6b18712ec44cce5713ddef1a21aec5f12651d901 /test/test_statement.c
parent248a874d7425749d29cf900a1c3783c624ea8d8c (diff)
downloadserd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.tar.gz
serd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.tar.bz2
serd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.zip
[WIP] Generalize node construction API
Diffstat (limited to 'test/test_statement.c')
-rw-r--r--test/test_statement.c27
1 files changed, 13 insertions, 14 deletions
diff --git a/test/test_statement.c b/test/test_statement.c
index 0127b7bf..fe1ce818 100644
--- a/test/test_statement.c
+++ b/test/test_statement.c
@@ -6,7 +6,6 @@
#include "serd/caret.h"
#include "serd/node.h"
#include "serd/statement.h"
-#include "serd/string_view.h"
#include <assert.h>
#include <stddef.h>
@@ -16,9 +15,9 @@
static void
test_new(void)
{
- SerdNode* const u = serd_new_uri(NULL, serd_string(NS_EG "s"));
- SerdNode* const b = serd_new_blank(NULL, serd_string("b0"));
- SerdNode* const l = serd_new_string(NULL, serd_string("str"));
+ SerdNode* const u = serd_node_new(NULL, serd_a_uri_string(NS_EG "s"));
+ SerdNode* const b = serd_node_new(NULL, serd_a_blank_string("b0"));
+ SerdNode* const l = serd_node_new(NULL, serd_a_string("str"));
assert(!serd_statement_new(NULL, u, b, u, NULL, NULL));
assert(!serd_statement_new(NULL, l, u, u, NULL, NULL));
@@ -37,11 +36,11 @@ test_copy(void)
{
assert(!serd_statement_copy(NULL, NULL));
- SerdNode* const f = serd_new_string(NULL, serd_string("file"));
- SerdNode* const s = serd_new_uri(NULL, serd_string(NS_EG "s"));
- SerdNode* const p = serd_new_uri(NULL, serd_string(NS_EG "p"));
- SerdNode* const o = serd_new_uri(NULL, serd_string(NS_EG "o"));
- SerdNode* const g = serd_new_uri(NULL, serd_string(NS_EG "g"));
+ SerdNode* const f = serd_node_new(NULL, serd_a_string("file"));
+ SerdNode* const s = serd_node_new(NULL, serd_a_uri_string(NS_EG "s"));
+ SerdNode* const p = serd_node_new(NULL, serd_a_uri_string(NS_EG "p"));
+ SerdNode* const o = serd_node_new(NULL, serd_a_uri_string(NS_EG "o"));
+ SerdNode* const g = serd_node_new(NULL, serd_a_uri_string(NS_EG "g"));
SerdCaret* const caret = serd_caret_new(NULL, f, 1, 1);
SerdStatement* const statement = serd_statement_new(NULL, s, p, o, g, caret);
@@ -69,11 +68,11 @@ test_free(void)
static void
test_fields(void)
{
- SerdNode* const f = serd_new_string(NULL, serd_string("file"));
- SerdNode* const s = serd_new_uri(NULL, serd_string(NS_EG "s"));
- SerdNode* const p = serd_new_uri(NULL, serd_string(NS_EG "p"));
- SerdNode* const o = serd_new_uri(NULL, serd_string(NS_EG "o"));
- SerdNode* const g = serd_new_uri(NULL, serd_string(NS_EG "g"));
+ SerdNode* const f = serd_node_new(NULL, serd_a_string("file"));
+ SerdNode* const s = serd_node_new(NULL, serd_a_uri_string(NS_EG "s"));
+ SerdNode* const p = serd_node_new(NULL, serd_a_uri_string(NS_EG "p"));
+ SerdNode* const o = serd_node_new(NULL, serd_a_uri_string(NS_EG "o"));
+ SerdNode* const g = serd_node_new(NULL, serd_a_uri_string(NS_EG "g"));
SerdCaret* const caret = serd_caret_new(NULL, f, 1, 1);
SerdStatement* const statement = serd_statement_new(NULL, s, p, o, g, caret);