Change test-resources path to src/test/resources
This commit is contained in:
5
compiler/src/test/resources/examples/branch/if_int_false
Normal file
5
compiler/src/test/resources/examples/branch/if_int_false
Normal file
@ -0,0 +1,5 @@
|
||||
if (0) {
|
||||
println(81);
|
||||
} else {
|
||||
println(42);
|
||||
}
|
5
compiler/src/test/resources/examples/branch/if_int_true
Normal file
5
compiler/src/test/resources/examples/branch/if_int_true
Normal file
@ -0,0 +1,5 @@
|
||||
if(1){
|
||||
println(81);
|
||||
} else{
|
||||
println(42);
|
||||
}
|
@ -0,0 +1,5 @@
|
||||
int add(int a, int b) {
|
||||
return a + b;
|
||||
}
|
||||
|
||||
println(add(5, 8));
|
9
compiler/src/test/resources/examples/functions/scopes
Normal file
9
compiler/src/test/resources/examples/functions/scopes
Normal file
@ -0,0 +1,9 @@
|
||||
int i;
|
||||
i = 42;
|
||||
int randomNumber() {
|
||||
int i;
|
||||
i = 4;
|
||||
return i;
|
||||
}
|
||||
println(randomNumber());
|
||||
println(i);
|
@ -0,0 +1,5 @@
|
||||
int number() {
|
||||
return 4;
|
||||
}
|
||||
|
||||
println(number());
|
@ -0,0 +1,6 @@
|
||||
int x(int i) {
|
||||
println(i);
|
||||
return i;
|
||||
}
|
||||
|
||||
println(x(0) && x(1));
|
@ -0,0 +1,6 @@
|
||||
int x(int i) {
|
||||
println(i);
|
||||
return i;
|
||||
}
|
||||
|
||||
println(x(1) || x(0));
|
Reference in New Issue
Block a user