Commit 114da118 authored by Tobias Knorr's avatar Tobias Knorr
Browse files

added tests from group 4

parent ba463b3d
Pipeline #180604 failed with stage
in 16 minutes and 49 seconds
class Main {
public int foo() {
boolean b = true;
int x = 50;
int y = -50;
while (x > 20 && y != 229) {
x = x - 1;
if ((b = (x % 5 != 0))) {
System.out.println(x);
} else {
x = ((x + y + 38) % 75) + 20;
y = y + 9;
System.out.println(y);
}
}
return x + y;
}
public static void main(String[] main) {
Main bar = new Main();
System.out.println(bar.foo());
System.out.flush();
}
}
49
48
47
46
-41
52
51
-32
66
-23
-14
49
48
47
46
-5
88
87
86
4
62
61
13
46
22
31
44
43
42
41
40
53
52
51
49
72
71
58
26
67
76
39
38
37
36
85
93
92
91
94
82
81
103
81
112
121
34
33
32
31
130
58
57
56
139
92
91
148
61
157
166
29
28
27
26
175
23
22
21
184
27
26
193
41
202
211
24
23
22
21
220
63
62
61
229
267
class Main {
public int a;
public boolean b;
public static void main(String[] args) {
Main m = new Main();
System.out.println(0);
m.a = 42;
m.b = true;
if ((m.a == m.f()) == m.b) {
System.out.println(1);
}
System.out.println(m.f());
while (m.b) {
System.out.println(2);
m.b = false;
}
System.out.println(3);
}
public int f() {
return 42;
}
}
0
1
42
2
3
\ No newline at end of file
class Foo{
int i;
public static void main(String[] args){
Foo test = new Foo();
test.i = 1;
if (true || test.increment()) {
System.out.println(13);
}
System.out.println(test.i);
if (test.increment() || test.increment()) {
System.out.println(test.i);
}
}
public boolean increment() {
i = i + 1;
return true;
}
}
\ No newline at end of file
13
1
2
\ No newline at end of file
class Foo{
public Foo foo;
public static void main(String[] args){
Foo foo = new Foo();
foo.foo = foo;
foo.foo(1024);
}
public void foo(int i) {
if (i > 12) {
foo.foo.foo(i / 2);
System.out.println(i);
}
}
}
\ No newline at end of file
16
32
64
128
256
512
1024
\ No newline at end of file
class Test {
public int i;
public static void main(String[] args) {
Test2 test = new Test2();
test.i = 2;
Test2 test2 = new Test2();
test2.i = 4;
test.foo(test2);
}
}
class Test2 {
public int i;
public void foo(Test2 test) {
while (i > 0 && test.getValue() > 0) {
System.out.println(getValue());
}
if (test.i > 0) {
System.out.println(test.i);
} else {
System.out.println(24);
}
}
public int getValue() {
int j = i;
i = i - 1;
return j;
}
}
2
1
2
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment