aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-02-24 18:39:39 -0500
committerDavid Robillard <d@drobilla.net>2021-03-08 23:23:05 -0500
commit1cb902b98bdbdbcae1217b0d189c9dce3ffe3bb0 (patch)
treec72294da732ff74a2434295599501c4c121f16da /test
parent2eece42c6670a4dbe1f3e53707fcf3ea268d17a4 (diff)
downloadserd-1cb902b98bdbdbcae1217b0d189c9dce3ffe3bb0.tar.gz
serd-1cb902b98bdbdbcae1217b0d189c9dce3ffe3bb0.tar.bz2
serd-1cb902b98bdbdbcae1217b0d189c9dce3ffe3bb0.zip
Clean up env test
Diffstat (limited to 'test')
-rw-r--r--test/test_env.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_env.c b/test/test_env.c
index c00ae37b..fcc45c53 100644
--- a/test/test_env.c
+++ b/test/test_env.c
@@ -34,22 +34,21 @@ count_prefixes(void* handle, const SerdEvent* event)
static void
test_env(void)
{
+ static const SerdStringView prefix = SERD_STATIC_STRING("eg.2");
static const SerdStringView eg = SERD_STATIC_STRING("http://example.org/");
SerdNode* hello = serd_new_string(SERD_STATIC_STRING("hello\""));
SerdNode* foo_u = serd_new_uri(SERD_STATIC_STRING("http://example.org/foo"));
+ SerdNode* empty = serd_new_uri(SERD_STATIC_STRING(""));
SerdNode* foo_c = serd_new_curie(SERD_STATIC_STRING("eg.2:foo"));
SerdNode* b = serd_new_curie(SERD_STATIC_STRING("invalid"));
-
- const SerdStringView prefix = SERD_STATIC_STRING("eg.2");
- SerdEnv* env = serd_env_new(SERD_EMPTY_STRING());
+ SerdEnv* env = serd_env_new(SERD_EMPTY_STRING());
serd_env_set_prefix(env, prefix, eg);
assert(!serd_env_base_uri(env));
assert(!serd_env_set_base_uri(env, SERD_EMPTY_STRING()));
assert(!serd_env_base_uri(env));
- assert(!serd_env_base_uri(env));
assert(serd_env_set_prefix(env,
SERD_STATIC_STRING("eg.3"),
@@ -118,6 +117,7 @@ test_env(void)
serd_node_free(qualified);
serd_sink_free(count_prefixes_sink);
serd_node_free(foo_c);
+ serd_node_free(empty);
serd_node_free(foo_u);
serd_node_free(b);
serd_env_free(env_copy);