A couple more testcases
This commit is contained in:
parent
e610e85a8a
commit
124cf8f433
24
fco2/testcases/constants.occ
Normal file
24
fco2/testcases/constants.occ
Normal file
|
@ -0,0 +1,24 @@
|
|||
PROC P ()
|
||||
INT X:
|
||||
SEQ
|
||||
X := 42
|
||||
|
||||
-- These should be pulled out of the proc...
|
||||
VAL INT a IS 42:
|
||||
VAL INT b IS a + 1:
|
||||
VAL INT c IS a + b:
|
||||
VAL []INT d IS [1, 2, 3, 4]:
|
||||
VAL INT e IS d[2]:
|
||||
VAL INT32 f RETYPES a:
|
||||
VAL INT g IS BYTESIN (a):
|
||||
-- ... and these shouldn't.
|
||||
INT A:
|
||||
VAL INT B IS A:
|
||||
VAL INT C IS X:
|
||||
VAL []INT D IS [1, 2, X, 4]:
|
||||
VAL INT E IS D[2]: -- technically the others should be OK, but I think that's excessive analysis!
|
||||
INT32 F RETYPES A:
|
||||
VAL INT G IS BYTESIN (E):
|
||||
|
||||
SKIP
|
||||
:
|
26
fco2/testcases/multidim.occ
Normal file
26
fco2/testcases/multidim.occ
Normal file
|
@ -0,0 +1,26 @@
|
|||
PROC A ([]INT a1)
|
||||
SKIP
|
||||
:
|
||||
PROC B (VAL [][]INT a2)
|
||||
SKIP
|
||||
:
|
||||
PROC P ()
|
||||
INT zero:
|
||||
[10]INT one:
|
||||
[10][10]INT two:
|
||||
[10][10][10]INT three:
|
||||
SEQ
|
||||
zero := 42
|
||||
one[1] := zero
|
||||
zero := one[1]
|
||||
two[1][2] := zero
|
||||
zero := two[1][2]
|
||||
three[1][2][3] := zero
|
||||
zero := three[1][2][3]
|
||||
|
||||
A (one)
|
||||
A (two[1])
|
||||
A (three[1][2])
|
||||
B (two)
|
||||
B (three[1])
|
||||
:
|
Loading…
Reference in New Issue
Block a user