From: brarcher Date: Mon, 17 Feb 2014 12:07:52 +0000 (+0000) Subject: add test for tcase_add_loop_test_raise_signal X-Git-Tag: 0.10.0~95 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=76f52349753685c9092b6d559c42e86d6f056dbc;p=check add test for tcase_add_loop_test_raise_signal There was originally no test for this git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@1122 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- diff --git a/src/check.h.in b/src/check.h.in index 4720706..4f22da0 100644 --- a/src/check.h.in +++ b/src/check.h.in @@ -235,8 +235,6 @@ CK_DLL_EXP TCase *CK_EXPORT tcase_create(const char *name); * * The added test is expected to terminate by throwing the given signal * - * @todo add a test case; this is untested as part of Check's tests. - * * @param tc test case to add test to * @param tf function to add to test case * @param signal expected signal for test function to throw in order for diff --git a/tests/check_check_exit.c b/tests/check_check_exit.c index 72fd07b..9bd4939 100644 --- a/tests/check_check_exit.c +++ b/tests/check_check_exit.c @@ -35,6 +35,13 @@ START_TEST(loop_early_exit_allowed_exit) } END_TEST +START_TEST(loop_early_exit_signal_segv) +{ + raise (SIGSEGV); + ck_abort_msg("Should've exitted..."); +} +END_TEST + Suite *make_exit_suite(void) { Suite *s; @@ -48,5 +55,6 @@ Suite *make_exit_suite(void) tcase_add_exit_test(tc,test_early_exit_with_allowed_error,-1); tcase_add_loop_test(tc,loop_early_exit_normal,0,5); tcase_add_loop_exit_test(tc,loop_early_exit_allowed_exit,-2,0,5); + tcase_add_loop_test_raise_signal(tc, loop_early_exit_signal_segv, SIGSEGV, 0, 5); return s; }