$NetBSD: patch-ab,v 1.5 2007/03/09 16:25:56 rillig Exp $ Too few arguments to varargs macro. --- tests/check_check_sub.c.orig Tue Nov 21 18:19:15 2006 +++ tests/check_check_sub.c Fri Mar 9 11:06:47 2007 @@ -58,12 +58,13 @@ } END_TEST - +#if defined(__GNUC__) START_TEST(test_fail_no_msg) { fail_unless(4 == 5); } END_TEST +#endif START_TEST(test_fail_if_null_msg) { @@ -71,12 +72,13 @@ } END_TEST - +#if defined(__GNUC__) START_TEST(test_fail_if_no_msg) { fail_if(4 != 5); } END_TEST +#endif START_TEST(test_fail_vararg_msg_1) { @@ -102,11 +104,13 @@ } END_TEST +#if defined(__GNUC__) START_TEST(test_fail_empty) { fail(); } END_TEST +#endif START_TEST(test_segv) /* line 111 */ { @@ -201,7 +205,7 @@ if((pid = fork()) < 0) { fail("Failed to fork new process"); } else if (pid > 0) { - fail_unless(1); + fail_unless(1, NULL); kill(pid, SIGKILL); } else { for (;;) { @@ -237,7 +241,7 @@ } else if (pid > 0) { check_waitpid_and_exit(pid); } else { - fail_unless(1); + fail_unless(1, NULL); check_waitpid_and_exit(0); } } @@ -268,7 +272,7 @@ if((pid2 = check_fork()) < 0) { fail("Failed to fork new process"); } else if (pid2 == 0) { - fail_unless(1); + fail_unless(1, NULL); check_waitpid_and_exit(0); } check_waitpid_and_exit(pid2); @@ -361,13 +365,19 @@ tcase_add_test (tc_simple, test_fail_if_pass); tcase_add_test (tc_simple, test_fail_if_fail); tcase_add_test (tc_simple, test_fail_null_msg); +#if defined(__GNUC__) tcase_add_test (tc_simple, test_fail_no_msg); +#endif tcase_add_test (tc_simple, test_fail_if_null_msg); +#if defined(__GNUC__) tcase_add_test (tc_simple, test_fail_if_no_msg); +#endif tcase_add_test (tc_simple, test_fail_vararg_msg_1); tcase_add_test (tc_simple, test_fail_vararg_msg_2); tcase_add_test (tc_simple, test_fail_vararg_msg_3); +#if defined(__GNUC__) tcase_add_test (tc_simple, test_fail_empty); +#endif tcase_add_test (tc_signal, test_segv); tcase_add_test_raise_signal (tc_signal, test_segv, 11); /* pass */