1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
$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 */
|