From 2dfc26609bffc7961fe01d88bc4c270b682b8f88 Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Wed, 29 May 2019 17:00:53 +0100 Subject: [PATCH] test: improve test_mutt_list_free() --- test/list/mutt_list_free.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/list/mutt_list_free.c b/test/list/mutt_list_free.c index faab626fc..ebc98ff85 100644 --- a/test/list/mutt_list_free.c +++ b/test/list/mutt_list_free.c @@ -24,6 +24,7 @@ #include "acutest.h" #include "config.h" #include "mutt/mutt.h" +#include "common.h" void test_mutt_list_free(void) { @@ -33,4 +34,17 @@ void test_mutt_list_free(void) mutt_list_free(NULL); TEST_CHECK_(1, "mutt_list_free(NULL)"); } + + { + struct ListHead lh = STAILQ_HEAD_INITIALIZER(lh); + mutt_list_free(&lh); + TEST_CHECK_(1, "mutt_list_free(&lh)"); + } + + { + static const char *names[] = { "Amy", "Beth", "Cathy", "Denise", NULL }; + struct ListHead lh = test_list_create(names, true); + mutt_list_free(&lh); + TEST_CHECK_(1, "mutt_list_free(&lh)"); + } } -- 2.40.0