From 356697e44ec840d701833cfb413e4df23c303cbf Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sun, 19 Oct 2014 20:02:06 +0200 Subject: [PATCH] improve test for attrib::nexttype correctness. --- src/util/attrib.test.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/util/attrib.test.c b/src/util/attrib.test.c index 2e15c8321..479809d1d 100644 --- a/src/util/attrib.test.c +++ b/src/util/attrib.test.c @@ -69,6 +69,13 @@ static void test_attrib_nexttype(CuTest * tc) CuAssertPtrEquals(tc, a, alist->nexttype); CuAssertPtrEquals(tc, 0, a->nexttype); + a_remove(&alist, alist); + CuAssertPtrEquals(tc, a, alist->nexttype); + + CuAssertPtrNotNull(tc, (a = a_add(&alist, a_new(&at_bar)))); + a_remove(&alist, alist->nexttype); + CuAssertPtrEquals(tc, a, alist->nexttype); + a_removeall(&alist, &at_foo); a_removeall(&alist, &at_bar); }