Define variables necessary for some of the constant-folding tests.

This commit is contained in:
Adam Sampson 2008-04-06 13:12:04 +00:00
parent 118a1f3527
commit 8f7c8b9fcb
2 changed files with 2 additions and 1 deletions

View File

@ -45,6 +45,7 @@ startState
undefined
defineConst "someBytes" (A.Array [A.UnknownDimension] A.Byte)
undefined
defineVariable "var" A.Int
-- | Test 'OccamPasses.foldConstants'.
testFoldConstants :: Test

View File

@ -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