shithub: scc

Download patch

ref: 541539b33afc0c198e44ecce36b6b0f2030c6b3b
parent: fe2b29d13bac3ab3c16490b859f452201c6b4c77
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Sun Oct 31 14:26:03 EDT 2021

tests/cc: Fix test 0142-char-const

The test had several bugs and after fixing them it works
without problems.

--- a/tests/cc/execute/0142-char-const.c
+++ b/tests/cc/execute/0142-char-const.c
@@ -9,32 +9,32 @@
 		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;
 }
--- 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