More testcases
This commit is contained in:
parent
939205670b
commit
63a39f5a27
5
fco2/testcases/_bad_string_cont.occ
Normal file
5
fco2/testcases/_bad_string_cont.occ
Normal file
|
@ -0,0 +1,5 @@
|
|||
PROC P ()
|
||||
VAL []BYTE s IS "hello *
|
||||
not a star":
|
||||
SKIP
|
||||
:
|
2
fco2/testcases/_bad_string_cont2.occ
Normal file
2
fco2/testcases/_bad_string_cont2.occ
Normal file
|
@ -0,0 +1,2 @@
|
|||
PROC P ()
|
||||
VAL []BYTE s IS "hello *
|
31
fco2/testcases/indentation.occ
Normal file
31
fco2/testcases/indentation.occ
Normal file
|
@ -0,0 +1,31 @@
|
|||
-- Comment here
|
||||
PROC P () -- more commentry
|
||||
INT x:
|
||||
INT y:
|
||||
VAL []BYTE s IS "hello, world!":
|
||||
VAL []BYTE not.comment IS "string -- with dashes -- here!":
|
||||
VAL []BYTE one.cont IS "one string cont line *
|
||||
*continued here.":
|
||||
VAL []BYTE two.cont IS "two string cont lines *
|
||||
*continued here... *
|
||||
*and also here!":
|
||||
SEQ
|
||||
x := 42 --comment!
|
||||
y := x + 22
|
||||
y := x +
|
||||
22
|
||||
y :=
|
||||
x
|
||||
x,
|
||||
y :=
|
||||
y,
|
||||
x
|
||||
IF
|
||||
(x =
|
||||
2) AND
|
||||
(y =
|
||||
42)
|
||||
STOP
|
||||
TRUE
|
||||
SKIP
|
||||
:
|
7
fco2/testcases/multidim-literal.occ
Normal file
7
fco2/testcases/multidim-literal.occ
Normal file
|
@ -0,0 +1,7 @@
|
|||
PROC P ()
|
||||
VAL [2][2]INT is IS
|
||||
[[1, 2],
|
||||
[3, 4]]:
|
||||
INT x:
|
||||
x := is[1][1]
|
||||
:
|
14
fco2/testcases/pull-consts.occ
Normal file
14
fco2/testcases/pull-consts.occ
Normal file
|
@ -0,0 +1,14 @@
|
|||
VAL INT table.x IS 36:
|
||||
VAL INT table.y IS 14:
|
||||
VAL []INT forks.x IS [2, 3, 8, 9, 5]:
|
||||
VAL []INT forks.y IS [3, 1, 1, 3, 4]:
|
||||
VAL []INT phils.x IS [-2, -2, 4, 12, 9]:
|
||||
VAL []INT phils.y IS [4, -1, -3, 1, 5]:
|
||||
|
||||
PROC main ()
|
||||
INT x:
|
||||
SEQ
|
||||
x := table.x
|
||||
x := forks.x[0] + forks.y[0]
|
||||
x := phils.x[0] + phils.y[0]
|
||||
:
|
Loading…
Reference in New Issue
Block a user