71 lines
1.9 KiB
Text
71 lines
1.9 KiB
Text
$NetBSD: patch-ae,v 1.1 2007/03/09 16:25:57 rillig Exp $
|
|
|
|
IRIX and HP/UX don't have strsignal.
|
|
|
|
Too few arguments to varargs macro.
|
|
|
|
--- tests/check_check_master.c.orig Fri Mar 9 11:11:41 2007
|
|
+++ tests/check_check_master.c Fri Mar 9 11:11:49 2007
|
|
@@ -86,6 +86,17 @@
|
|
|
|
static int nr_of_master_tests = sizeof master_tests /sizeof master_tests[0];
|
|
|
|
+#if defined(__sgi)
|
|
+static const char *
|
|
+strsignal(int sig)
|
|
+{
|
|
+ static char signame[40];
|
|
+
|
|
+ sprintf(signame, "SIG#%d", sig);
|
|
+ return signame;
|
|
+}
|
|
+#endif
|
|
+
|
|
START_TEST(test_check_nfailures)
|
|
{
|
|
int i;
|
|
@@ -123,9 +134,9 @@
|
|
continue;
|
|
}
|
|
|
|
- fail_if(i - passed > sub_nfailed);
|
|
+ fail_if(i - passed > sub_nfailed, NULL);
|
|
tr = tr_fail_array[i - passed];
|
|
- fail_unless(tr != NULL);
|
|
+ fail_unless(tr != NULL, NULL);
|
|
got_msg = tr_msg(tr);
|
|
expected_msg = master_tests[i].msg;
|
|
if (strcmp(got_msg, expected_msg) != 0) {
|
|
@@ -152,9 +163,9 @@
|
|
continue;
|
|
}
|
|
|
|
- fail_if(i - passed > sub_nfailed);
|
|
+ fail_if(i - passed > sub_nfailed, NULL);
|
|
tr = tr_fail_array[i - passed];
|
|
- fail_unless(tr != NULL);
|
|
+ fail_unless(tr != NULL, NULL);
|
|
line_no = master_tests[i].line_nos;
|
|
if (line_no > 0 && tr_lno(tr) != line_no) {
|
|
char *emsg = malloc(MAXSTR);
|
|
@@ -179,9 +190,9 @@
|
|
continue;
|
|
}
|
|
|
|
- fail_if(i - passed > sub_nfailed);
|
|
+ fail_if(i - passed > sub_nfailed, NULL);
|
|
tr = tr_fail_array[i - passed];
|
|
- fail_unless(tr != NULL);
|
|
+ fail_unless(tr != NULL, NULL);
|
|
fail_unless(master_tests[i].failure_type == tr_rtype(tr),
|
|
"Failure type wrong for test %d", i);
|
|
}
|
|
@@ -193,7 +204,7 @@
|
|
int i;
|
|
for (i = 0; i < sub_nfailed; i++) {
|
|
TestResult *tr = tr_fail_array[i];
|
|
- fail_unless(tr != NULL);
|
|
+ fail_unless(tr != NULL, NULL);
|
|
fail_unless(tr_lfile(tr) != NULL, "Bad file name for test %d", i);
|
|
fail_unless(strstr(tr_lfile(tr), "check_check_sub.c") != 0,
|
|
"Bad file name for test %d", i);
|