Changed the rain for-each pass to extract the inner result type to check against, not the IO monad (oops)

This commit is contained in:
Neil Brown 2007-08-16 13:35:23 +00:00
parent 3d1d5e35ef
commit 8a9ce4e205

View File

@ -10,8 +10,11 @@ import RainPasses
import CompState
import Control.Monad.Error (runErrorT)
testEachPass0 :: Test
testEachPass0 = TestCase $ assertPatternMatch "testEachPass0" exp (evalStateT (runErrorT (transformEach orig)) emptyState)
testEachPass0 :: Assertion
testEachPass0 = do origResult <- (evalStateT (runErrorT (transformEach orig)) emptyState)
case origResult of
Left err -> assertFailure ("testEachPass0; pass failed with: " ++ err)
Right origTrans -> assertPatternMatch "testEachPass0" exp origTrans
where
orig = A.Seq m
(A.Rep m
@ -47,7 +50,7 @@ testEachPass0 = TestCase $ assertPatternMatch "testEachPass0" exp (evalStateT (r
tests :: Test
tests = TestList
[
testEachPass0
TestCase $ testEachPass0
]