From: brarcher Date: Sat, 4 Jan 2014 18:33:53 +0000 (+0000) Subject: add test for check_list_advance(NULL) X-Git-Tag: 0.10.0~198 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=220011751067ce8a74e475bfa0909ce094ddcfd0;p=check add test for check_list_advance(NULL) There had been no test yet for this case. git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1018 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/tests/check_list.c b/tests/check_list.c index 058ceef..502f5f2 100644 --- a/tests/check_list.c +++ b/tests/check_list.c @@ -132,6 +132,13 @@ START_TEST(test_add_a_bunch) } END_TEST +START_TEST(test_list_abuse) +{ + check_list_advance(NULL); + /* Should not crash */ +} +END_TEST + Suite *make_list_suite (void) { @@ -146,5 +153,7 @@ Suite *make_list_suite (void) tcase_add_test (tc, test_add_end_and_next); tcase_add_test (tc, test_add_front_and_next); tcase_add_test (tc, test_add_a_bunch); + tcase_add_test (tc, test_list_abuse); + return s; }