aboutsummaryrefslogtreecommitdiffstats
path: root/tests/env_test.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-06-20 20:58:27 +0200
committerDavid Robillard <d@drobilla.net>2020-10-27 13:13:59 +0100
commit44afc616ada1315bfcc1f2fb6bd82656ced8b2f5 (patch)
treebff66abc7b8df8bd0a4e081e21b2c388f6635b95 /tests/env_test.c
parentf9c7cac95abb7c5430c9ecd6f0a7220c3f8b5205 (diff)
downloadserd-44afc616ada1315bfcc1f2fb6bd82656ced8b2f5.tar.gz
serd-44afc616ada1315bfcc1f2fb6bd82656ced8b2f5.tar.bz2
serd-44afc616ada1315bfcc1f2fb6bd82656ced8b2f5.zip
Make const Env functions tolerant of NULL
This is convenient in places where you don't necessarily need an Env, since in this case these methods work the same as if with an empty Env.
Diffstat (limited to 'tests/env_test.c')
-rw-r--r--tests/env_test.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/env_test.c b/tests/env_test.c
index cc04366d..cff8e3cf 100644
--- a/tests/env_test.c
+++ b/tests/env_test.c
@@ -46,6 +46,10 @@ test_env(void)
SerdEnv* env = serd_env_new(NULL);
serd_env_set_prefix(env, pre, eg);
+ assert(!serd_env_base_uri(NULL));
+ assert(!serd_env_expand(NULL, NULL));
+ assert(!serd_env_qualify(NULL, NULL));
+
assert(!serd_env_base_uri(env));
assert(serd_env_set_base_uri(env, NULL));
assert(serd_env_set_base_uri(env, empty));