Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
caipng committed Apr 25, 2024
1 parent 26c4443 commit f68c6a8
Show file tree
Hide file tree
Showing 19 changed files with 317 additions and 1,124 deletions.
32 changes: 32 additions & 0 deletions test/assign.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
int * p = (int * ) malloc(10);
int (*q)[3];
struct S { int x; char y; struct { char c; } z; } s;
int ea[2];
int arr[5][3];
short s1, s2;
int i;
int * pp;
int * test[3];

int addInt(int n, int m) {
return n + m;
}

int (*fnPtr)(int, int);
int sum;

int main() {
test[1] = ∑
test[2] = (int *) malloc(sizeof (struct S) * 3);
test[0] = (int *) malloc(sizeof q * 3);
fnPtr = &addInt;
sum = (********fnPtr)(2, 3);
s1 = s2 = 10ull;
p = (int * ) 1;
s.z.c = 'A';
ea[1] = -3;
arr[0][4] = -1;
pp = arr[1];
1[pp] = 69;
free(test[0]);
}
1 change: 0 additions & 1 deletion test/assignment.c

This file was deleted.

262 changes: 0 additions & 262 deletions test/avl.c

This file was deleted.

35 changes: 35 additions & 0 deletions test/blocks.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
struct s {
char c;
int x;
char d;
} dd;

int A;
char C;

void f(int a, int b, char c) {
int d = a + b;
int * p = malloc(15);
int * p1 = (int *) malloc(15);
{
int ii;
int kk;
}
{
int jj;
int kk;
{
short kk;
kk = 1;
}
int ll;
{
short s2;
}
}
return;
}

int main() {
f(1, 2, 3);
}
Loading

0 comments on commit f68c6a8

Please sign in to comment.