From e51ac7ec7d3e32e1771c9f824da3dc7e4dcd2bc5 Mon Sep 17 00:00:00 2001 From: lemon Date: Sat, 13 Dec 2025 19:21:04 +0100 Subject: add c-testsuite --- .../external/c-testsuite/tests/single-exec/00075.c | 166 +++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 test/external/c-testsuite/tests/single-exec/00075.c (limited to 'test/external/c-testsuite/tests/single-exec/00075.c') diff --git a/test/external/c-testsuite/tests/single-exec/00075.c b/test/external/c-testsuite/tests/single-exec/00075.c new file mode 100644 index 0000000..975b6f6 --- /dev/null +++ b/test/external/c-testsuite/tests/single-exec/00075.c @@ -0,0 +1,166 @@ +#if (-2) != -2 +#error fail +#endif + +#if (0 || 0) != 0 +#error fail +#endif + +#if (1 || 0) != 1 +#error fail +#endif + +#if (1 || 1) != 1 +#error fail +#endif + +#if (0 && 0) != 0 +#error fail +#endif + +#if (1 && 0) != 0 +#error fail +#endif + +#if (0 && 1) != 0 +#error fail +#endif + +#if (1 && 1) != 1 +#error fail +#endif + +#if (0xf0 | 1) != 0xf1 +#error fail +#endif + +#if (0xf0 & 1) != 0 +#error fail +#endif + +#if (0xf0 & 0x1f) != 0x10 +#error fail +#endif + +#if (1 ^ 1) != 0 +#error fail +#endif + +#if (1 == 1) != 1 +#error fail +#endif + +#if (1 == 0) != 0 +#error fail +#endif + +#if (1 != 1) != 0 +#error fail +#endif + +#if (0 != 1) != 1 +#error fail +#endif + +#if (0 > 1) != 0 +#error fail +#endif + +#if (0 < 1) != 1 +#error fail +#endif + +#if (0 > -1) != 1 +#error fail +#endif + +#if (0 < -1) != 0 +#error fail +#endif + +#if (0 >= 1) != 0 +#error fail +#endif + +#if (0 <= 1) != 1 +#error fail +#endif + +#if (0 >= -1) != 1 +#error fail +#endif + +#if (0 <= -1) != 0 +#error fail +#endif + +#if (0 < 0) != 0 +#error fail +#endif + +#if (0 <= 0) != 1 +#error fail +#endif + +#if (0 > 0) != 0 +#error fail +#endif + +#if (0 >= 0) != 1 +#error fail +#endif + +#if (1 << 1) != 2 +#error fail +#endif + +#if (2 >> 1) != 1 +#error fail +#endif + +#if (2 + 1) != 3 +#error fail +#endif + +#if (2 - 3) != -1 +#error fail +#endif + +#if (2 * 3) != 6 +#error fail +#endif + +#if (6 / 3) != 2 +#error fail +#endif + +#if (7 % 3) != 1 +#error fail +#endif + +#if (2+2*3+2) != 10 +#error fail +#endif + +#if ((2+2)*(3+2)) != 20 +#error fail +#endif + +#if (2 + 2 + 2 + 2 == 2 + 2 * 3) != 1 +#error fail +#endif + +#if (0 ? 1 : 3) != 3 +#error fail +#endif + +#if (1 ? 3 : 1) != 3 +#error fail +#endif + +int +main() +{ + return 0; +} + -- cgit v1.2.3