Skip to content

Commit

Permalink
The bad tests have been modified
Browse files Browse the repository at this point in the history
  • Loading branch information
kreofil committed Aug 15, 2022
1 parent cc0704f commit 9b6b917
Show file tree
Hide file tree
Showing 4 changed files with 95 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#include <stdio.h>

double d1;
double d2 = 3.14
double d3 = 0;

int main() {
d1 = d2 + d3;
printf("d1 = %f\n, d1);
printf("d2 = %f\n, d2);
printf("d3 = %f\n, d3);

return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#include <stdio.h>

void foo1() {
static int a = 10;
a++;
printf("a-foo1 = %d\n", a);
}

void foo2() {
static int a = 20;
a++;
printf("a-foo2 = %d\n", a);
}

int main(){
foo1();
foo2();
return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#include <stdio.h>

void foo1() {
static int a = 10;
a++;
printf("a-foo1-1 = %d\n", a);
{
static int a = 30;
a++;
printf("a-foo1-2 = %d\n", a);
}
}

void foo2() {
static int a = 20;
a++;
printf("a-foo2-1 = %d\n", a);
{
static int a = 40;
a++;
printf("a-foo2-2 = %d\n", a);
}
}

int main(){
foo1();
foo2();
return 0;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#include <stdio.h>

void foo1() {
static int a = 10;
a++;
printf("a-foo1-1 = %d\n", a);
{
static int a = 30;
a++;
printf("a-foo1-2 = %d\n", a);
}
}

void foo2() {
static int a = 20;
a++;
printf("a-foo2-1 = %d\n", a);
{
static int a = 40;
a++;
printf("a-foo2-2 = %d\n", a);
}
}

static int a = 50;

int main(){
a++;
foo1();
foo2();
printf("a-glob-static = %d\n", a);
return 0;
}

0 comments on commit 9b6b917

Please sign in to comment.