diff options
author | David Robillard <d@drobilla.net> | 2023-05-05 09:43:57 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2023-12-02 18:49:08 -0500 |
commit | 4711fdf527f416faee8ff19e15f050d4b48dcfb2 (patch) | |
tree | 6b18712ec44cce5713ddef1a21aec5f12651d901 /test/test_env.c | |
parent | 248a874d7425749d29cf900a1c3783c624ea8d8c (diff) | |
download | serd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.tar.gz serd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.tar.bz2 serd-4711fdf527f416faee8ff19e15f050d4b48dcfb2.zip |
[WIP] Generalize node construction API
Diffstat (limited to 'test/test_env.c')
-rw-r--r-- | test/test_env.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/test_env.c b/test/test_env.c index 89947826..eec8a2ef 100644 --- a/test/test_env.c +++ b/test/test_env.c @@ -202,7 +202,7 @@ static void test_base_uri(void) { SerdEnv* const env = serd_env_new(NULL, serd_empty_string()); - SerdNode* const eg = serd_new_uri(NULL, serd_string(NS_EG)); + SerdNode* const eg = serd_node_new(NULL, serd_a_uri_string(NS_EG)); // Test that invalid calls work as expected assert(!serd_env_base_uri(env)); @@ -262,7 +262,7 @@ test_set_prefix(void) static void test_expand_untyped_literal(void) { - SerdNode* const untyped = serd_new_string(NULL, serd_string("data")); + SerdNode* const untyped = serd_node_new(NULL, serd_a_string("data")); SerdEnv* const env = serd_env_new(NULL, serd_empty_string()); assert(!serd_env_expand_node(env, untyped)); @@ -277,7 +277,7 @@ test_expand_bad_uri_datatype(void) const SerdStringView type = serd_string("Type"); SerdNode* const typed = - serd_new_literal(NULL, serd_string("data"), SERD_HAS_DATATYPE, type); + serd_node_new(NULL, serd_a_typed_literal(serd_string("data"), type)); SerdEnv* const env = serd_env_new(NULL, serd_empty_string()); @@ -293,9 +293,9 @@ test_expand_uri(void) const SerdStringView base = serd_string("http://example.org/b/"); SerdEnv* const env = serd_env_new(NULL, base); - SerdNode* const rel = serd_new_uri(NULL, serd_string("rel")); + SerdNode* const rel = serd_node_new(NULL, serd_a_uri_string("rel")); SerdNode* const rel_out = serd_env_expand_node(env, rel); - SerdNode* const empty = serd_new_uri(NULL, serd_empty_string()); + SerdNode* const empty = serd_node_new(NULL, serd_a_uri_string("")); SerdNode* const empty_out = serd_env_expand_node(env, empty); assert(!strcmp(serd_node_string(rel_out), "http://example.org/b/rel")); @@ -313,7 +313,7 @@ test_expand_empty_uri_ref(void) { const SerdStringView base = serd_string("http://example.org/b/"); - SerdNode* const rel = serd_new_uri(NULL, serd_string("rel")); + SerdNode* const rel = serd_node_new(NULL, serd_a_uri_string("rel")); SerdEnv* const env = serd_env_new(NULL, base); SerdNode* const rel_out = serd_env_expand_node(env, rel); @@ -327,7 +327,7 @@ test_expand_empty_uri_ref(void) static void test_expand_bad_uri(void) { - SerdNode* const bad_uri = serd_new_uri(NULL, serd_string("rel")); + SerdNode* const bad_uri = serd_node_new(NULL, serd_a_uri_string("rel")); SerdEnv* const env = serd_env_new(NULL, serd_empty_string()); assert(!serd_env_expand_node(env, bad_uri)); @@ -372,7 +372,7 @@ test_expand_bad_curie(void) static void test_expand_blank(void) { - SerdNode* const blank = serd_new_blank(NULL, serd_string("b1")); + SerdNode* const blank = serd_node_new(NULL, serd_a_blank_string("b1")); SerdEnv* const env = serd_env_new(NULL, serd_empty_string()); assert(!serd_env_expand_node(env, blank)); |