scc

simple C compiler
git clone git://git.2f30.org/scc
Log | Files | Refs | README | LICENSE

commit 74dbbc136740a9abda39763cad7abc332c86c00c
parent 8a57ba149a24de43b6163d49f59aacd93b9c9c57
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 26 Feb 2017 18:30:21 +0100

[tests] Add more tests

Diffstat:
Atests/execute/0121-localinit.c | 5+++++
Atests/execute/0122-localinit.c | 6++++++
Atests/execute/0123-doubleconst.c | 7+++++++
Atests/execute/0124-enumstruct.c | 10++++++++++
Mtests/execute/scc-tests.lst | 4++++
5 files changed, 32 insertions(+), 0 deletions(-)

diff --git a/tests/execute/0121-localinit.c b/tests/execute/0121-localinit.c @@ -0,0 +1,5 @@ +main() +{ + int x[] = { 1, 0 }; + return x[1]; +} diff --git a/tests/execute/0122-localinit.c b/tests/execute/0122-localinit.c @@ -0,0 +1,6 @@ +int +main() +{ + struct { int x; } s = { 0 }; + return s.x; +} diff --git a/tests/execute/0123-doubleconst.c b/tests/execute/0123-doubleconst.c @@ -0,0 +1,7 @@ +double x = 100; + +int +main() +{ + return x < 1; +} diff --git a/tests/execute/0124-enumstruct.c b/tests/execute/0124-enumstruct.c @@ -0,0 +1,10 @@ +struct { + enum { X } x; +} s; + + +int +main() +{ + return X; +} diff --git a/tests/execute/scc-tests.lst b/tests/execute/scc-tests.lst @@ -111,3 +111,7 @@ 0118-voidmain.c TODO 0119-macrostr.c 0120-funpar.c +0121-localinit.c TODO +0122-localinit.c TODO +0123-doubleconst.c TODO +0124-enumstruct.c TODO