From 2d5c5aa0677c5aaeb60446ebcfe961c9abfbbf7b Mon Sep 17 00:00:00 2001 From: Richard Russon Date: Fri, 24 May 2019 23:24:04 +0100 Subject: [PATCH] test: improve test_mutt_buffer_free() --- test/buffer/mutt_buffer_free.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/test/buffer/mutt_buffer_free.c b/test/buffer/mutt_buffer_free.c index 73951d24a..59d04e578 100644 --- a/test/buffer/mutt_buffer_free.c +++ b/test/buffer/mutt_buffer_free.c @@ -38,5 +38,20 @@ void test_mutt_buffer_free(void) struct Buffer *buf = NULL; mutt_buffer_free(&buf); TEST_CHECK_(1, "mutt_buffer_free(&buf)"); + TEST_CHECK(buf == NULL); + } + + { + struct Buffer *buf = mutt_buffer_new(); + mutt_buffer_free(&buf); + TEST_CHECK_(1, "mutt_buffer_free(&buf)"); + TEST_CHECK(buf == NULL); + } + + { + struct Buffer *buf = mutt_buffer_from("test"); + mutt_buffer_free(&buf); + TEST_CHECK_(1, "mutt_buffer_free(&buf)"); + TEST_CHECK(buf == NULL); } } -- 2.40.0