Added tests with multi-dimensional arrays
This commit is contained in:
parent
86b8185b1f
commit
10493717aa
34
testcases/automatic/usage-check-4.occ.test
Normal file
34
testcases/automatic/usage-check-4.occ.test
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
-- This file tests simple array uses without replication
|
||||||
|
-- Four unknown variables are available; x, y, z.
|
||||||
|
-- Two arrays are automatically declared; a (size 10*6) and b (size 12*12)
|
||||||
|
|
||||||
|
PROC p(INT x, y, z)
|
||||||
|
[10][6]INT a:
|
||||||
|
[12][12]INT b:
|
||||||
|
PAR
|
||||||
|
%%
|
||||||
|
:
|
||||||
|
|
||||||
|
PROC m()
|
||||||
|
SKIP
|
||||||
|
:
|
||||||
|
|
||||||
|
%PASS Distinct constants
|
||||||
|
a[0][0] := 3
|
||||||
|
a[1][0] := 4
|
||||||
|
a[0][1] := 5
|
||||||
|
a[1][1] := 6
|
||||||
|
|
||||||
|
%FAIL Identical constants
|
||||||
|
a[0][0] := 3
|
||||||
|
a[0][0] := 4
|
||||||
|
|
||||||
|
%FAIL Identical constants, PAR assign
|
||||||
|
a[0][0],a[0][0] := 3,4
|
||||||
|
|
||||||
|
%PASS Same constant, different array
|
||||||
|
a[0][0] := 3
|
||||||
|
b[0][0] := 4
|
||||||
|
|
||||||
|
-- TODO add replication and such
|
||||||
|
%
|
|
@ -765,20 +765,18 @@ qcOmegaPrune = [scaleQC (100,1000,10000,50000) prop]
|
||||||
|
|
||||||
ioqcTests :: IO (Test, [QuickCheckTest])
|
ioqcTests :: IO (Test, [QuickCheckTest])
|
||||||
ioqcTests
|
ioqcTests
|
||||||
= do usageCheckTest1 <- automaticTest "testcases/automatic/usage-check-1.occ.test"
|
= seqPair
|
||||||
usageCheckTest2 <- automaticTest "testcases/automatic/usage-check-2.occ.test"
|
(liftM TestList $ sequence
|
||||||
usageCheckTest3 <- automaticTest "testcases/automatic/usage-check-3.occ.test"
|
|
||||||
return
|
|
||||||
(TestList
|
|
||||||
[
|
[
|
||||||
testArrayCheck
|
return testArrayCheck
|
||||||
,testIndexes
|
,return testIndexes
|
||||||
,testMakeEquations
|
,return testMakeEquations
|
||||||
,usageCheckTest1
|
,automaticTest "testcases/automatic/usage-check-1.occ.test"
|
||||||
,usageCheckTest2
|
,automaticTest "testcases/automatic/usage-check-2.occ.test"
|
||||||
,usageCheckTest3
|
,automaticTest "testcases/automatic/usage-check-3.occ.test"
|
||||||
|
,automaticTest "testcases/automatic/usage-check-4.occ.test"
|
||||||
]
|
]
|
||||||
,qcOmegaEquality ++ qcOmegaPrune)
|
,return $ qcOmegaEquality ++ qcOmegaPrune)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user