improve test for attrib::nexttype correctness.

This commit is contained in:
Enno Rehling 2014-10-19 20:02:06 +02:00
parent eb1d73e2c2
commit 356697e44e
1 changed files with 7 additions and 0 deletions

View File

@ -69,6 +69,13 @@ static void test_attrib_nexttype(CuTest * tc)
CuAssertPtrEquals(tc, a, alist->nexttype); CuAssertPtrEquals(tc, a, alist->nexttype);
CuAssertPtrEquals(tc, 0, a->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_foo);
a_removeall(&alist, &at_bar); a_removeall(&alist, &at_bar);
} }