first commit
This commit is contained in:
commit
063194f8be
349 changed files with 36508 additions and 0 deletions
1
tester/testsuite/bad/bad001.jl
Normal file
1
tester/testsuite/bad/bad001.jl
Normal file
|
@ -0,0 +1 @@
|
|||
/*
|
1
tester/testsuite/bad/bad002.jl
Normal file
1
tester/testsuite/bad/bad002.jl
Normal file
|
@ -0,0 +1 @@
|
|||
a
|
3
tester/testsuite/bad/bad003.jl
Normal file
3
tester/testsuite/bad/bad003.jl
Normal file
|
@ -0,0 +1,3 @@
|
|||
int f(int x, int x) {
|
||||
return x;
|
||||
}
|
4
tester/testsuite/bad/bad004.jl
Normal file
4
tester/testsuite/bad/bad004.jl
Normal file
|
@ -0,0 +1,4 @@
|
|||
int main)( {
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
1
tester/testsuite/bad/bad005.jl
Normal file
1
tester/testsuite/bad/bad005.jl
Normal file
|
@ -0,0 +1 @@
|
|||
foo() {}
|
4
tester/testsuite/bad/bad006.jl
Normal file
4
tester/testsuite/bad/bad006.jl
Normal file
|
@ -0,0 +1,4 @@
|
|||
int main() {
|
||||
x = 14;
|
||||
return 0 ;
|
||||
}
|
5
tester/testsuite/bad/bad007.jl
Normal file
5
tester/testsuite/bad/bad007.jl
Normal file
|
@ -0,0 +1,5 @@
|
|||
int main() {
|
||||
int x;
|
||||
int x;
|
||||
return 0 ;
|
||||
}
|
4
tester/testsuite/bad/bad008.jl
Normal file
4
tester/testsuite/bad/bad008.jl
Normal file
|
@ -0,0 +1,4 @@
|
|||
int main() {
|
||||
if (false)
|
||||
return 0;
|
||||
}
|
5
tester/testsuite/bad/bad009.jl
Normal file
5
tester/testsuite/bad/bad009.jl
Normal file
|
@ -0,0 +1,5 @@
|
|||
int main() {
|
||||
int x;
|
||||
x = true;
|
||||
return 1;
|
||||
}
|
6
tester/testsuite/bad/bad010.jl
Normal file
6
tester/testsuite/bad/bad010.jl
Normal file
|
@ -0,0 +1,6 @@
|
|||
int main() {
|
||||
if (true)
|
||||
return;
|
||||
;
|
||||
return 1;
|
||||
}
|
3
tester/testsuite/bad/bad011.jl
Normal file
3
tester/testsuite/bad/bad011.jl
Normal file
|
@ -0,0 +1,3 @@
|
|||
int main() {
|
||||
return true;
|
||||
}
|
6
tester/testsuite/bad/bad012.jl
Normal file
6
tester/testsuite/bad/bad012.jl
Normal file
|
@ -0,0 +1,6 @@
|
|||
int main() {
|
||||
int i = foo(true);
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
int foo(boolean b) { b = true; }
|
5
tester/testsuite/bad/bad013.jl
Normal file
5
tester/testsuite/bad/bad013.jl
Normal file
|
@ -0,0 +1,5 @@
|
|||
int main() {
|
||||
double x ;
|
||||
x = 2 * 3.14 ;
|
||||
return 0 ;
|
||||
}
|
6
tester/testsuite/bad/bad015.jl
Normal file
6
tester/testsuite/bad/bad015.jl
Normal file
|
@ -0,0 +1,6 @@
|
|||
// passing doubles to printInt().
|
||||
|
||||
int main() {
|
||||
printInt(1.0);
|
||||
return 0 ;
|
||||
}
|
6
tester/testsuite/bad/bad016.jl
Normal file
6
tester/testsuite/bad/bad016.jl
Normal file
|
@ -0,0 +1,6 @@
|
|||
// passing integers to printDouble().
|
||||
|
||||
int main() {
|
||||
printDouble(1);
|
||||
return 0 ;
|
||||
}
|
11
tester/testsuite/bad/bad017.jl
Normal file
11
tester/testsuite/bad/bad017.jl
Normal file
|
@ -0,0 +1,11 @@
|
|||
// 0 instead of 1 argument
|
||||
|
||||
int main() {
|
||||
int x = foo();
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
int foo(int y) {
|
||||
return y;
|
||||
}
|
||||
|
11
tester/testsuite/bad/bad018.jl
Normal file
11
tester/testsuite/bad/bad018.jl
Normal file
|
@ -0,0 +1,11 @@
|
|||
// 1 instead of 2 arguments
|
||||
|
||||
int main() {
|
||||
int x = foo(1);
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
int foo(int y,int z) {
|
||||
return y;
|
||||
}
|
||||
|
11
tester/testsuite/bad/bad019.jl
Normal file
11
tester/testsuite/bad/bad019.jl
Normal file
|
@ -0,0 +1,11 @@
|
|||
// 2 instead of 1 arguments
|
||||
|
||||
int main() {
|
||||
int x = foo(1,2);
|
||||
return 0 ;
|
||||
}
|
||||
|
||||
int foo(int y) {
|
||||
return y;
|
||||
}
|
||||
|
8
tester/testsuite/bad/bad020.jl
Normal file
8
tester/testsuite/bad/bad020.jl
Normal file
|
@ -0,0 +1,8 @@
|
|||
// Compare double with boolean.
|
||||
|
||||
int main() {
|
||||
if (2.0 == true) {
|
||||
printString("foo");
|
||||
}
|
||||
return 0 ;
|
||||
}
|
6
tester/testsuite/bad/bad021.jl
Normal file
6
tester/testsuite/bad/bad021.jl
Normal file
|
@ -0,0 +1,6 @@
|
|||
/* Testing that main must return. */
|
||||
|
||||
/* All functions should return a value of their value type. This is not a valid Javalette program: */
|
||||
|
||||
int main() {
|
||||
}
|
6
tester/testsuite/bad/bad022.jl
Normal file
6
tester/testsuite/bad/bad022.jl
Normal file
|
@ -0,0 +1,6 @@
|
|||
// Assigning double to int variable.
|
||||
|
||||
int main () {
|
||||
int x = 1.0;
|
||||
return 0 ;
|
||||
}
|
6
tester/testsuite/bad/bad023.jl
Normal file
6
tester/testsuite/bad/bad023.jl
Normal file
|
@ -0,0 +1,6 @@
|
|||
// Assigning int to double variable.
|
||||
|
||||
int main () {
|
||||
double x = 1;
|
||||
return 0 ;
|
||||
}
|
4
tester/testsuite/bad/bad024.jl
Normal file
4
tester/testsuite/bad/bad024.jl
Normal file
|
@ -0,0 +1,4 @@
|
|||
int main() {
|
||||
if (false)
|
||||
return 0;
|
||||
}
|
8
tester/testsuite/bad/bad025.jl
Normal file
8
tester/testsuite/bad/bad025.jl
Normal file
|
@ -0,0 +1,8 @@
|
|||
int main() {
|
||||
return f(3);
|
||||
}
|
||||
|
||||
int f(int x) {
|
||||
if (x<0)
|
||||
return x;
|
||||
}
|
7
tester/testsuite/bad/bad026.jl
Normal file
7
tester/testsuite/bad/bad026.jl
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Assigning double to int variable.
|
||||
|
||||
int main () {
|
||||
int x;
|
||||
x = 1.0;
|
||||
return 0 ;
|
||||
}
|
7
tester/testsuite/bad/bad027.jl
Normal file
7
tester/testsuite/bad/bad027.jl
Normal file
|
@ -0,0 +1,7 @@
|
|||
// Assigning int to double variable.
|
||||
|
||||
int main () {
|
||||
double x;
|
||||
x = 1;
|
||||
return 0 ;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue