aboutsummaryrefslogtreecommitdiffstats
path: root/test/test_env.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-06-20 20:58:27 +0200
committerDavid Robillard <d@drobilla.net>2021-03-08 23:23:05 -0500
commit40a83074705976ea59f0e1a5d06a4e5c7705472c (patch)
tree942f70ec83597833ed71a9aa6bb507d1b473bc15 /test/test_env.c
parentd4a5e5c0581aa25ac91e1d3d7d5900f0d7202ed9 (diff)
downloadserd-40a83074705976ea59f0e1a5d06a4e5c7705472c.tar.gz
serd-40a83074705976ea59f0e1a5d06a4e5c7705472c.tar.bz2
serd-40a83074705976ea59f0e1a5d06a4e5c7705472c.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 'test/test_env.c')
-rw-r--r--test/test_env.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/test/test_env.c b/test/test_env.c
index fcc45c53..651bf8c9 100644
--- a/test/test_env.c
+++ b/test/test_env.c
@@ -46,6 +46,10 @@ test_env(void)
serd_env_set_prefix(env, prefix, eg);
+ assert(!serd_env_base_uri(NULL));
+ assert(!serd_env_expand(NULL, NULL));
+ assert(!serd_env_qualify(NULL, foo_u));
+
assert(!serd_env_base_uri(env));
assert(!serd_env_set_base_uri(env, SERD_EMPTY_STRING()));
assert(!serd_env_base_uri(env));