diff options
Diffstat (limited to 'test/test_env.c')
-rw-r--r-- | test/test_env.c | 8 |
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); |