mise à jour des tests
This commit is contained in:
@@ -1 +1 @@
|
||||
FUNC INT main() RETURN 0 + 1 + 2
|
||||
FUNC INT main() RETURN 0 + 1
|
||||
1
tests/fragment0/add0.test_ret
Normal file
1
tests/fragment0/add0.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
15
|
||||
1
tests/fragment0/add0.vsl
Normal file
1
tests/fragment0/add0.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 7 + 8
|
||||
1
tests/fragment0/add1.test_ret
Normal file
1
tests/fragment0/add1.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
50
|
||||
1
tests/fragment0/add1.vsl
Normal file
1
tests/fragment0/add1.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 7 + 8 + 5 + 10+10+ 10
|
||||
1
tests/fragment0/const1.test_ret
Normal file
1
tests/fragment0/const1.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
42
|
||||
1
tests/fragment0/const1.vsl
Normal file
1
tests/fragment0/const1.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 42
|
||||
1
tests/fragment0/div0.test_ret
Normal file
1
tests/fragment0/div0.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
4
|
||||
1
tests/fragment0/div0.vsl
Normal file
1
tests/fragment0/div0.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 20/5
|
||||
1
tests/fragment0/div1.test_ret
Normal file
1
tests/fragment0/div1.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
2
|
||||
1
tests/fragment0/div1.vsl
Normal file
1
tests/fragment0/div1.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 12 / 3 / 2
|
||||
1
tests/fragment0/mod.vsl
Normal file
1
tests/fragment0/mod.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 21 % 5
|
||||
1
tests/fragment0/mult1.test_ret
Normal file
1
tests/fragment0/mult1.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
20
|
||||
1
tests/fragment0/mult1.vsl
Normal file
1
tests/fragment0/mult1.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 4*5
|
||||
1
tests/fragment0/mult2.test_ret
Normal file
1
tests/fragment0/mult2.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
40
|
||||
1
tests/fragment0/mult2.vsl
Normal file
1
tests/fragment0/mult2.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 4*5*2
|
||||
1
tests/fragment0/paren.test_ret
Normal file
1
tests/fragment0/paren.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
120
|
||||
1
tests/fragment0/paren.vsl
Normal file
1
tests/fragment0/paren.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 4 * (6 + 4) * 3
|
||||
1
tests/fragment0/priority1.test_ret
Normal file
1
tests/fragment0/priority1.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
37
|
||||
1
tests/fragment0/priority1.vsl
Normal file
1
tests/fragment0/priority1.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 4 + 6 * 5 + 3
|
||||
1
tests/fragment0/priority2.test_ret
Normal file
1
tests/fragment0/priority2.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
8
|
||||
1
tests/fragment0/priority2.vsl
Normal file
1
tests/fragment0/priority2.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 1 + 2 * (4 + 5 % 3 + 2) - 3 - 16 / 8 - 4
|
||||
1
tests/fragment0/sub0.test_ret
Normal file
1
tests/fragment0/sub0.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
3
|
||||
1
tests/fragment0/sub0.vsl
Normal file
1
tests/fragment0/sub0.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 8-5
|
||||
1
tests/fragment0/sub1.test_ret
Normal file
1
tests/fragment0/sub1.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
85
|
||||
1
tests/fragment0/sub1.vsl
Normal file
1
tests/fragment0/sub1.vsl
Normal file
@@ -0,0 +1 @@
|
||||
FUNC INT main() RETURN 100 + (10 - 20 - 5)
|
||||
5
tests/fragment1/assign1.vsl
Normal file
5
tests/fragment1/assign1.vsl
Normal file
@@ -0,0 +1,5 @@
|
||||
FUNC INT main() {
|
||||
INT x
|
||||
x := 1
|
||||
RETURN x
|
||||
}
|
||||
6
tests/fragment1/assign2.vsl
Normal file
6
tests/fragment1/assign2.vsl
Normal file
@@ -0,0 +1,6 @@
|
||||
FUNC INT main() {
|
||||
INT x, y
|
||||
x := 1
|
||||
y := x
|
||||
RETURN y
|
||||
}
|
||||
1
tests/fragment1/decl.test_ret
Normal file
1
tests/fragment1/decl.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
2
|
||||
4
tests/fragment1/decl.vsl
Normal file
4
tests/fragment1/decl.vsl
Normal file
@@ -0,0 +1,4 @@
|
||||
FUNC INT main() {
|
||||
INT x
|
||||
RETURN 2
|
||||
}
|
||||
1
tests/fragment1/if1.test_ret
Normal file
1
tests/fragment1/if1.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
tests/fragment1/if2.test_ret
Normal file
1
tests/fragment1/if2.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
1
tests/fragment1/print2.test_out
Normal file
1
tests/fragment1/print2.test_out
Normal file
@@ -0,0 +1 @@
|
||||
1
|
||||
@@ -5,3 +5,4 @@
|
||||
5+1 = 6
|
||||
5* (5+7) = 60
|
||||
5* 5+7 = 32
|
||||
-2 = -2
|
||||
@@ -6,5 +6,6 @@ FUNC VOID main() {
|
||||
PRINT 5,"+",1," = ", 5+1 ,"\n"
|
||||
PRINT 5,"* (",5,"+",7,") = ", 5*(5+7) ,"\n"
|
||||
PRINT 5,"* ",5,"+",7," = ", 5 * 5 + 7 ,"\n"
|
||||
PRINT "-2 = ", -2
|
||||
}
|
||||
|
||||
3
tests/fragment1/read2.test_in
Normal file
3
tests/fragment1/read2.test_in
Normal file
@@ -0,0 +1,3 @@
|
||||
2
|
||||
7
|
||||
|
||||
1
tests/fragment1/read2.test_out
Normal file
1
tests/fragment1/read2.test_out
Normal file
@@ -0,0 +1 @@
|
||||
x vaut 2 et y vaut 7
|
||||
5
tests/fragment1/read2.vsl
Normal file
5
tests/fragment1/read2.vsl
Normal file
@@ -0,0 +1,5 @@
|
||||
FUNC VOID main() {
|
||||
INT x,y
|
||||
READ x, y
|
||||
PRINT "x vaut ",x," et y vaut ",y
|
||||
}
|
||||
1
tests/fragment1/while2.test_ret
Normal file
1
tests/fragment1/while2.test_ret
Normal file
@@ -0,0 +1 @@
|
||||
84
|
||||
10
tests/fragment1/while2.vsl
Normal file
10
tests/fragment1/while2.vsl
Normal file
@@ -0,0 +1,10 @@
|
||||
FUNC INT main() {
|
||||
INT x, y x :=
|
||||
42 y:=0
|
||||
WHILE x DO {
|
||||
x := x - 1
|
||||
y := y + 2
|
||||
} DONE
|
||||
RETURN y
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user