summaryrefslogtreecommitdiffstats
path: root/liblog_destroy_context.c
diff options
context:
space:
mode:
Diffstat (limited to 'liblog_destroy_context.c')
-rw-r--r--liblog_destroy_context.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/liblog_destroy_context.c b/liblog_destroy_context.c
index 57192ac..6a3fa09 100644
--- a/liblog_destroy_context.c
+++ b/liblog_destroy_context.c
@@ -27,6 +27,20 @@ liblog_destroy_context(struct liblog_context *ctx)
#else
-int main(void) {return 0;} /* TODO test */
+int
+main(void)
+{
+ struct liblog_context ctx;
+ char *nullenv[] = {NULL};
+
+ environ = nullenv;
+
+ ASSERT_ZERO(liblog_destroy_context(NULL));
+
+ ASSERT_ZERO(liblog_init_context(&ctx));
+ ASSERT_ZERO(liblog_destroy_context(&ctx));
+
+ return 0;
+}
#endif