mirror of
https://github.com/JonathanFleischmann/CompilerULTIMATE.git
synced 2024-12-28 17:28:03 +00:00
wrote more Testfiles and created files for abstract syntax
This commit is contained in:
parent
a1cc591220
commit
2595d5de08
@ -0,0 +1,3 @@
|
||||
//public class ClassWithAssignment {
|
||||
// int x = 10;
|
||||
//}
|
@ -0,0 +1,11 @@
|
||||
//public class ClassWithConstructor {
|
||||
// int x = 10;
|
||||
// public classWithConstructor() {
|
||||
// this.x = 10;
|
||||
// for (int i = 0; i < 6; i++) {
|
||||
// for (int j = 0; j < this.x; j++) {
|
||||
// this.x = this.x * this.x;
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
//}
|
11
src/main/resources/JavaTestfiles/ClassWithConstructor.java
Normal file
11
src/main/resources/JavaTestfiles/ClassWithConstructor.java
Normal file
@ -0,0 +1,11 @@
|
||||
public class ClassWithConstructor {
|
||||
int x = 10;
|
||||
public classWithConstructor() {
|
||||
this.x = 10;
|
||||
for (int i = 0; i < 6; i++) {
|
||||
for (int j = 0; j < this.x; j++) {
|
||||
this.x = this.x * this.x;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
public class ClassWithConstructorAndMethodCall {
|
||||
int x = 10;
|
||||
public classWithConstructorAndMethodCall() {
|
||||
this.x = 10;
|
||||
while (methodCall()) {
|
||||
this.x = this.x * this.x;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean methodCall() {
|
||||
if (x > 100) {
|
||||
return false;
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
public class ClassWithConstructorWithParameters {
|
||||
int x = 0;
|
||||
public classWithConstructorWithParameters(int startvalue, int repitions) {
|
||||
this.x = startvalue;
|
||||
while (repitions > 0) {
|
||||
int innerRepititions = this.x;
|
||||
while (innerRepititions > 0) {
|
||||
this.x = this.x * this.x;
|
||||
innerRepititions--;
|
||||
}
|
||||
repitions--;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user