diff --git a/scaffold/tests/44-switch.c b/scaffold/tests/44-switch.c index a90c58f3..8ba8ee78 100644 --- a/scaffold/tests/44-switch.c +++ b/scaffold/tests/44-switch.c @@ -46,6 +46,10 @@ swits (int c) c = 34; break; } + case 5: + case 4: + case 3: + case 2: case -1: case 1: x = 1; diff --git a/scaffold/tests/60-math.c b/scaffold/tests/60-math.c index c39c5bd1..99612c1e 100644 --- a/scaffold/tests/60-math.c +++ b/scaffold/tests/60-math.c @@ -45,57 +45,57 @@ test () if (0 < 0) return 1; puts ("t: 2 < 1\n"); - if (2 < 1) return 1; + if (2 < 1) return 2; puts ("t: -1 < -2\n"); - if (-1 < -2) return 1; + if (-1 < -2) return 3; puts ("t: 0 < -1\n"); - if (0 < -1) return 1; + if (0 < -1) return 4; puts ("t: 0 > 0\n"); - if (0 > 0) return 1; + if (0 > 0) return 5; puts ("t: 1 > 2\n"); - if (1 > 2) return 1; + if (1 > 2) return 6; puts ("t: -2 > -1\n"); - if (-2 > -1) return 1; + if (-2 > -1) return 7; puts ("t: -1 > 0\n"); - if (-1 > 0) return 1; + if (-1 > 0) return 9; puts ("t: 1 == inc (0)\n"); if (1 == inc (0)) goto ok0; - return 1; + return 10; ok0: puts ("t: 0 < inc (0)\n"); if (0 < inc (0)) goto ok1; - return 1; + return 11; ok1: puts ("t: inc (0) + 2 != 3\n"); - if (inc (0) + inc (1) != 3) return 1; + if (inc (0) + inc (1) != 3) return 12; puts ("t: 4/2="); i = 4 / 2; - if (i!=2) return 1; + if (i!=2) return 13; i += 48; putchar (i); puts ("\n"); puts ("t: 3*4=\n"); i = 3 * 4; - if (i!=12) return 1; + if (i!=12) return 14; puts ("t: i /= 4\n"); i /= 4; - if (i!=3) return 1; + if (i!=3) return 15; puts ("t: i *= 4\n"); i *= 4; - if (i!=12) return 1; + if (i!=12) return 16; puts ("t: 1 << 3\n"); if (1 << 3 != 8) return 1 << 3; @@ -114,37 +114,37 @@ test () i = -3; puts ("t: -i\n"); - if (-i != 3) return 1; + if (-i != 3) return 22; puts ("t: -1 + 2\n"); - if (-1 + 2 != 1) return 1; + if (-1 + 2 != 1) return 23; puts ("t: 1 & 3\n"); - if ((1 & 3) != 1) return 1; + if ((1 & 3) != 1) return 24; puts ("t: ~0\n"); - if (~0 != -1) return 1; + if (~0 != -1) return 25; puts ("t: 1 | 3\n"); - if ((1 | 2) != 3) return 1; + if ((1 | 2) != 3) return 26; puts ("t: ^ 1 \n"); - if ((1 ^ 3) != 2) return 1; + if ((1 ^ 3) != 2) return 27; puts ("t: 3 == 3\n"); - if ((3 == 3) != 1) return 1; + if ((3 == 3) != 1) return 28; puts ("t: 3 != 3\n"); - if ((3 != 3) != 0) return 1; + if ((3 != 3) != 0) return 29; puts ("t: 011 == 15\n"); - if (011 != 9) return 1; + if (011 != 9) return 30; puts ("t: 0b11 == 3\n"); - if (0b11 != 3) return 1; + if (0b11 != 3) return 31; puts ("t: 0x11 == 3\n"); - if (0x11 != 17) return 1; + if (0x11 != 17) return 32; return 0; } diff --git a/scaffold/tests/77-pointer-assign.c b/scaffold/tests/77-pointer-assign.c index 6d2b0136..c86ae09a 100644 --- a/scaffold/tests/77-pointer-assign.c +++ b/scaffold/tests/77-pointer-assign.c @@ -18,6 +18,8 @@ * along with Mes. If not, see . */ +#include + #include "30-test.i" struct baz { @@ -55,13 +57,15 @@ add2 (void *ptab) struct foo *hash_ident[10]; +#if !defined (__TINYC__) void * -memset (void *s, int c, int n) +memset (void *s, int c, size_t n) { char *p = s; while (n--) *p++ = c; return s; } +#endif int test () diff --git a/scaffold/tests/79-int-array.c b/scaffold/tests/79-int-array.c index 6834c14e..03677ed7 100644 --- a/scaffold/tests/79-int-array.c +++ b/scaffold/tests/79-int-array.c @@ -61,9 +61,9 @@ test () memcpy (&b[4], c, 2 * sizeof (int)); eputs ("b[4]:"); eputs (itoa (b[4])); eputs ("\n"); - if (b[4] != 201) return 5; + if (b[4] != 201) return 7; eputs ("b[5]:"); eputs (itoa (b[5])); eputs ("\n"); - if (b[5] != 211) return 6; + if (b[5] != 211) return 8; return 0; } diff --git a/scaffold/tests/7j-strtoull.c b/scaffold/tests/7j-strtoull.c index 11a91eab..d2abddf1 100644 --- a/scaffold/tests/7j-strtoull.c +++ b/scaffold/tests/7j-strtoull.c @@ -24,12 +24,14 @@ #include #include +#if !defined ( __TINYC__) unsigned long long strtoull (char const *p, char **end, int base) { *end = p; return abtoi (end, base); } +#endif int test ()