100% coverage

This commit is contained in:
Yaossg 2024-12-24 15:00:51 +08:00
parent 49ed7c5df5
commit 92f4b4f561
52 changed files with 143 additions and 48 deletions

View file

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

View file

@ -1,3 +0,0 @@
int main() {
int* a[10];
}

View file

@ -0,0 +1,5 @@
int main() {
int* a;
int* b;
a + b;
}

View file

@ -0,0 +1,5 @@
int main() {
int a;
int* b;
0 ? a : b;
}

View file

@ -0,0 +1,4 @@
int main() {
int a;
*a;
}

View file

@ -0,0 +1,4 @@
int main() {
void* p;
*p;
}

3
test/error/endless_arg.c Normal file
View file

@ -0,0 +1,3 @@
void f() {
f(0
}

View file

@ -0,0 +1,3 @@
int main() {
'
}

View file

@ -0,0 +1 @@
/*

View file

@ -0,0 +1 @@
enum { A = 1

View file

@ -0,0 +1 @@
void f(int a

View file

@ -0,0 +1,3 @@
int main() {
"
}

View file

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

View file

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

View file

@ -0,0 +1 @@
.

View file

@ -0,0 +1,3 @@
int main() {
return '\i';
}

View file

@ -0,0 +1 @@
enum { 0 };

View file

@ -0,0 +1 @@
int a[-1];

View file

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

3
test/error/not_a_name.c Normal file
View file

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

View file

@ -0,0 +1,4 @@
int main() {
int* p;
p * p;
}

View file

@ -0,0 +1,4 @@
int main() {
int* p;
~p;
}

View file

@ -0,0 +1,5 @@
int main() {
int* a;
char* b;
a - b;
}

View file

@ -0,0 +1 @@
`

View file

@ -0,0 +1,3 @@
int main() {
~~
}

View file

@ -0,0 +1 @@
0

View file

@ -0,0 +1,3 @@
int main() {
if 1
}

View file

@ -0,0 +1,2 @@
int size = 10;
int a[size];

1
test/error/void_arg.c Normal file
View file

@ -0,0 +1 @@
void f(void a) {}

1
test/error/void_global.c Normal file
View file

@ -0,0 +1 @@
void a;

3
test/error/void_local.c Normal file
View file

@ -0,0 +1,3 @@
void f() {
void a;
}