commit 012aa346999d09d3c644ea632e813a4caeaf93ec
parent 393c1bfe7ae06ca89378b050a460db5d9ae484f2
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date: Sat, 13 Nov 2021 08:21:25 +0100
tests/cc: Improve test 0152-cat.c
Returning different values in every case helps while debugging.
Diffstat:
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/tests/cc/execute/0152-cat.c b/tests/cc/execute/0152-cat.c
@@ -3,12 +3,19 @@
#define FOO foo
#define BAR bar
+int foobar;
+
int
main(void)
{
- int foo, bar, foobar;
+ int foo = 1, bar = 0;
+
+ CAT(foo,bar) += foo + bar;
+ if (foobar != 1)
+ return 1;
+ XCAT(FOO,BAR) += foo + bar;
+ if (foobar != 2)
+ return 2;
- CAT(foo,bar) = foo + bar;
- XCAT(FOO,BAR) = foo + bar;
return 0;
}