Define variables necessary for some of the constant-folding tests.
This commit is contained in:
parent
118a1f3527
commit
8f7c8b9fcb
|
@ -45,6 +45,7 @@ startState
|
|||
undefined
|
||||
defineConst "someBytes" (A.Array [A.UnknownDimension] A.Byte)
|
||||
undefined
|
||||
defineVariable "var" A.Int
|
||||
|
||||
-- | Test 'OccamPasses.foldConstants'.
|
||||
testFoldConstants :: Test
|
||||
|
|
|
@ -66,7 +66,7 @@ constantFoldTest = TestList
|
|||
foldCon n exp orig = TestCase $ testPass ("constantFoldTest " ++ show n) (buildExprPattern exp) (constantFoldPass $ buildExpr orig) state
|
||||
|
||||
state :: State CompState ()
|
||||
state = return ()
|
||||
state = defineVariable "x" A.Int64
|
||||
|
||||
lit :: Integer -> ExprHelper
|
||||
lit n = Lit $ int64Literal n
|
||||
|
|
Loading…
Reference in New Issue
Block a user