From 40a83074705976ea59f0e1a5d06a4e5c7705472c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 20 Jun 2020 20:58:27 +0200 Subject: 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. --- test/test_env.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/test_env.c') 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)); -- cgit v1.2.1