diff options
Diffstat (limited to 'tests/util.c')
-rw-r--r-- | tests/util.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/util.c b/tests/util.c index bc85b70..a720123 100644 --- a/tests/util.c +++ b/tests/util.c @@ -41,6 +41,16 @@ test_freeit(void) { test_ok(); } + { + testing("tolerate be given a NULL pointer"); + + void *p = NULL; + freeit(NULL); + freeit(p); + freeit((void *)&p); + + test_ok(); + } rc = 0; out: |