smarter and error test

This commit is contained in:
Yaossg 2024-12-24 11:31:50 +08:00
parent bf7f456967
commit 49ed7c5df5
37 changed files with 83 additions and 36 deletions

8
test/basic/enum.c Normal file
View file

@ -0,0 +1,8 @@
enum {
A, B, C = -B, D, E = +1, F,
};
int main() {
return A + B + C + D + E + F;
// 0 + 1 + -1 + 0 + 1 + 2 = 3
}

1
test/basic/enum.out Normal file
View file

@ -0,0 +1 @@
3

7
test/basic/hello.c Normal file
View file

@ -0,0 +1,7 @@
int printf(char* format, ...);
int gi = 42;
int main() {
printf("hello world %d\n", gi);
}

2
test/basic/hello.out Normal file
View file

@ -0,0 +1,2 @@
hello world 42
0

3
test/basic/main.c Normal file
View file

@ -0,0 +1,3 @@
int main() {
return 42;
}

1
test/basic/main.out Normal file
View file

@ -0,0 +1 @@
42