This commit is contained in:
@@ -4,10 +4,11 @@ import Test.Tasty (TestTree, testGroup)
|
||||
import Test.Tasty.HUnit
|
||||
import qualified Gyehoek.CPS.Stackify as Sut
|
||||
import Gyehoek.Stack.VM as Stk
|
||||
import Data.List (List)
|
||||
import Gyehoek.CPS.Syntax (cps)
|
||||
import Gyehoek.CPS.Syntax qualified as CPS
|
||||
import Gyehoek.GenSym (runGenSym)
|
||||
import Effectful
|
||||
import Gyehoek.Prelude
|
||||
|
||||
|
||||
test_stackify =
|
||||
@@ -19,9 +20,11 @@ test_stackify =
|
||||
]
|
||||
|
||||
evalsTo :: List Obj -> Sut.Exp -> Assertion
|
||||
evalsTo rs e =
|
||||
Stk.eval e' @?= rs
|
||||
where e' = runPureEff . runGenSym $ Sut.stackifyExp "main" e
|
||||
evalsTo rs e = Stk.eval e' @?= rs
|
||||
where
|
||||
e' = e & CPS.MkLambda [] "_ktail"
|
||||
& CPS.MkProgram
|
||||
& Sut.stackifyProgram & runGenSym & runPureEff
|
||||
|
||||
trivialReturn = testGroup "trivial return"
|
||||
[ testCase "return int" do
|
||||
|
||||
Reference in New Issue
Block a user