@@ -18,15 +18,17 @@ root = pure . testGroup "cps syntax" $
|
||||
]
|
||||
|
||||
freeTree :: TestTree
|
||||
freeTree = testCase "free" do
|
||||
Sut.free [cps|
|
||||
(letrec ((x (lambda (r k1) (continue k1 y)))
|
||||
(y (lambda (r k2) (continue k2 x))))
|
||||
(continue x y k3))|] @=? ["k3"]
|
||||
Sut.free' [cps|
|
||||
(letrec ((x (lambda (r k1) (continue k1 y)))
|
||||
(y (lambda (r k2) (continue k2 x))))
|
||||
(continue x y k3))|] @=? ["k3"]
|
||||
freeTree = testGroup "free"
|
||||
[ testCase "lambda" do
|
||||
Sut.free' @Sut.Lambda [cps|
|
||||
(lambda (x y z k1) (continue k1 x a b c y))
|
||||
|] @=? ["a","b","c"]
|
||||
, testCase "exp" do
|
||||
Sut.free' @Sut.Exp [cps|
|
||||
(letrec ((x (lambda (r k1) (continue k1 y)))
|
||||
(y (lambda (r k2) (continue k2 x))))
|
||||
(continue x y k3))|] @=? ["k3"]
|
||||
]
|
||||
|
||||
qqTree :: TestTree
|
||||
qqTree = testGroup "parser"
|
||||
|
||||
Reference in New Issue
Block a user