commit 541539b33afc0c198e44ecce36b6b0f2030c6b3b parent fe2b29d13bac3ab3c16490b859f452201c6b4c77 Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Sun, 31 Oct 2021 18:26:03 +0100 tests/cc: Fix test 0142-char-const The test had several bugs and after fixing them it works without problems. Diffstat:
| M | tests/cc/execute/0142-char-const.c | | | 22 | +++++++++++----------- |
| M | tests/cc/execute/scc-tests.lst | | | 2 | +- |
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/tests/cc/execute/0142-char-const.c b/tests/cc/execute/0142-char-const.c @@ -9,32 +9,32 @@ main(void) return 1; uc = '\x23'; - if (uc != 36) - return 1; + if (uc != 35) + return 2; uc = 1u; - if (uc != (1025 & 0xFF) + if (uc != (1025 & 0xFF)) return 1; uc = 'A'; if (uc != 0x41) - return 1; + return 3; sc = -1; if ((sc & 0xFF) != 0xFF) - return 1; + return 4; sc = '\x23'; - if (sc != 36) - return 1; + if (sc != 35) + return 5; sc = 1u; - if (uc != (1025 & 0xFF) - return 1; + if (sc != (1025 & 0xFF)) + return 6; sc = 'A'; - if (uc != 0x41) - return 1; + if (sc != 0x41) + return 7; return 0; } diff --git a/tests/cc/execute/scc-tests.lst b/tests/cc/execute/scc-tests.lst @@ -132,7 +132,7 @@ 0139-ptr-ary.c [TODO] 0140-int-fold.c 0141-int-iden.c -0142-char-const.c [TODO] +0142-char-const.c 0143-int-const.c 0144-long-const.c 0145-llong-const.c