added test cases
This commit is contained in:
12
test/corpus/negative/ArrayExpression1.txt
Normal file
12
test/corpus/negative/ArrayExpression1.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
====================
|
||||
ArrayExpression1
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() {
|
||||
x[] = 3;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
--------------------
|
||||
12
test/corpus/negative/ArrayExpression2.txt
Normal file
12
test/corpus/negative/ArrayExpression2.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
====================
|
||||
ArrayExpression2
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() {
|
||||
x[1, 3] = 3;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
--------------------
|
||||
12
test/corpus/negative/ArrayExpression3.txt
Normal file
12
test/corpus/negative/ArrayExpression3.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
====================
|
||||
ArrayExpression3
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() {
|
||||
x[[13]] = 3;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
--------------------
|
||||
12
test/corpus/negative/ArrayExpression4.txt
Normal file
12
test/corpus/negative/ArrayExpression4.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
====================
|
||||
ArrayExpression4
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() {
|
||||
x[13 3] = 3;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
--------------------
|
||||
12
test/corpus/negative/ArrayExpression5.txt
Normal file
12
test/corpus/negative/ArrayExpression5.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
====================
|
||||
ArrayExpression5
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() {
|
||||
x[13]3 = 3;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
--------------------
|
||||
12
test/corpus/negative/ArrayExpression6.txt
Normal file
12
test/corpus/negative/ArrayExpression6.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
====================
|
||||
ArrayExpression6
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() {
|
||||
x 3[13] = 3;
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
--------------------
|
||||
8
test/corpus/negative/Assignments1.txt
Normal file
8
test/corpus/negative/Assignments1.txt
Normal file
@@ -0,0 +1,8 @@
|
||||
====================
|
||||
Assignments1
|
||||
:error
|
||||
====================
|
||||
|
||||
int x += 3;
|
||||
|
||||
--------------------
|
||||
15
test/corpus/negative/ForStatement1.txt
Normal file
15
test/corpus/negative/ForStatement1.txt
Normal file
@@ -0,0 +1,15 @@
|
||||
====================
|
||||
ForStatement1
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() -> int {
|
||||
I32 x = 0;
|
||||
|
||||
for (;;;) {
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
--------------------
|
||||
13
test/corpus/negative/ForStatement2.txt
Normal file
13
test/corpus/negative/ForStatement2.txt
Normal file
@@ -0,0 +1,13 @@
|
||||
====================
|
||||
ForStatement2
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() -> int {
|
||||
for (while (true){};;) {
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
--------------------
|
||||
10
test/corpus/negative/FunctionCall1.txt
Normal file
10
test/corpus/negative/FunctionCall1.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
====================
|
||||
FunctionCall1
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() {
|
||||
f(3 3);
|
||||
}
|
||||
|
||||
--------------------
|
||||
9
test/corpus/negative/FunctionDeclaration1.txt
Normal file
9
test/corpus/negative/FunctionDeclaration1.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
====================
|
||||
FunctionDeclaration1
|
||||
:error
|
||||
====================
|
||||
|
||||
int main() {
|
||||
}
|
||||
|
||||
--------------------
|
||||
9
test/corpus/negative/FunctionDeclaration2.txt
Normal file
9
test/corpus/negative/FunctionDeclaration2.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
====================
|
||||
FunctionDeclaration2
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() : int {
|
||||
}
|
||||
|
||||
--------------------
|
||||
9
test/corpus/negative/FunctionDeclaration3.txt
Normal file
9
test/corpus/negative/FunctionDeclaration3.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
====================
|
||||
FunctionDeclaration3
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() -> {
|
||||
}
|
||||
|
||||
--------------------
|
||||
9
test/corpus/negative/FunctionDeclaration4.txt
Normal file
9
test/corpus/negative/FunctionDeclaration4.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
====================
|
||||
FunctionDeclaration4
|
||||
:error
|
||||
====================
|
||||
|
||||
function main(int a int b) {
|
||||
}
|
||||
|
||||
--------------------
|
||||
9
test/corpus/negative/FunctionDeclaration5.txt
Normal file
9
test/corpus/negative/FunctionDeclaration5.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
====================
|
||||
FunctionDeclaration5
|
||||
:error
|
||||
====================
|
||||
|
||||
function main(a) {
|
||||
}
|
||||
|
||||
--------------------
|
||||
9
test/corpus/negative/FunctionDeclaration6.txt
Normal file
9
test/corpus/negative/FunctionDeclaration6.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
====================
|
||||
FunctionDeclaration6
|
||||
:error
|
||||
====================
|
||||
|
||||
function main(, ) {
|
||||
}
|
||||
|
||||
--------------------
|
||||
9
test/corpus/negative/FunctionDeclaration7.txt
Normal file
9
test/corpus/negative/FunctionDeclaration7.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
====================
|
||||
FunctionDeclaration7
|
||||
:error
|
||||
====================
|
||||
|
||||
function main(int a, ) {
|
||||
}
|
||||
|
||||
--------------------
|
||||
9
test/corpus/negative/FunctionDeclaration8.txt
Normal file
9
test/corpus/negative/FunctionDeclaration8.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
====================
|
||||
FunctionDeclaration8
|
||||
:error
|
||||
====================
|
||||
|
||||
function main(, int a) {
|
||||
}
|
||||
|
||||
--------------------
|
||||
9
test/corpus/negative/FunctionDeclaration9.txt
Normal file
9
test/corpus/negative/FunctionDeclaration9.txt
Normal file
@@ -0,0 +1,9 @@
|
||||
====================
|
||||
FunctionDeclaration9
|
||||
:error
|
||||
====================
|
||||
|
||||
function main(a, int b) {
|
||||
}
|
||||
|
||||
--------------------
|
||||
10
test/corpus/negative/ReturnStatement1.txt
Normal file
10
test/corpus/negative/ReturnStatement1.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
====================
|
||||
ReturnStatement1
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() -> int {
|
||||
return 1, 4;
|
||||
}
|
||||
|
||||
--------------------
|
||||
10
test/corpus/negative/ReturnStatement2.txt
Normal file
10
test/corpus/negative/ReturnStatement2.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
====================
|
||||
ReturnStatement2
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() -> int {
|
||||
return 1 4;
|
||||
}
|
||||
|
||||
--------------------
|
||||
10
test/corpus/negative/ReturnStatement3.txt
Normal file
10
test/corpus/negative/ReturnStatement3.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
====================
|
||||
ReturnStatement3
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() -> int {
|
||||
return (1, 4);
|
||||
}
|
||||
|
||||
--------------------
|
||||
10
test/corpus/negative/WhileStatement1.txt
Normal file
10
test/corpus/negative/WhileStatement1.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
====================
|
||||
WhileStatement1
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() {
|
||||
while (true) {
|
||||
}
|
||||
|
||||
--------------------
|
||||
11
test/corpus/negative/WhileStatement2.txt
Normal file
11
test/corpus/negative/WhileStatement2.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
====================
|
||||
WhileStatement2
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() {
|
||||
while (true)
|
||||
}
|
||||
}
|
||||
|
||||
--------------------
|
||||
11
test/corpus/negative/WhileStatement3.txt
Normal file
11
test/corpus/negative/WhileStatement3.txt
Normal file
@@ -0,0 +1,11 @@
|
||||
====================
|
||||
WhileStatement3
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() {
|
||||
while () {
|
||||
}
|
||||
}
|
||||
|
||||
--------------------
|
||||
12
test/corpus/negative/WhileStatement4.txt
Normal file
12
test/corpus/negative/WhileStatement4.txt
Normal file
@@ -0,0 +1,12 @@
|
||||
====================
|
||||
WhileStatement4
|
||||
:error
|
||||
====================
|
||||
|
||||
function main() {
|
||||
while
|
||||
true {
|
||||
}
|
||||
}
|
||||
|
||||
--------------------
|
||||
Reference in New Issue
Block a user