tasty-discover

This commit is contained in:
2026-08-20 17:21:42 -06:00
parent fc8cf263aa
commit 25ba8c03b8
11 changed files with 50 additions and 62 deletions
+8 -9
View File
@@ -1,5 +1,5 @@
{-# LANGUAGE OverloadedLists #-}
module Gyehoek.Test.CPS.Syntax (root) where
module Gyehoek.Test.CPS.Syntax where
import Test.Tasty (TestTree, testGroup)
import Test.Tasty.HUnit
@@ -8,14 +8,13 @@ import Gyehoek.CPS.Syntax (cps)
import Gyehoek.CPS.Syntax qualified as Sut
root :: IO TestTree
root = pure . testGroup "cps syntax" $
[ qqTree
, freeTree
test_root = testGroup "cps syntax"
[ free
, qq
]
freeTree :: TestTree
freeTree = testGroup "free"
free :: TestTree
free = testGroup "free"
[ testCase "lambda" do
Sut.free' @Sut.Lambda [cps|
(lambda (x y z k1) (continue k1 x a b c y))
@@ -27,8 +26,8 @@ freeTree = testGroup "free"
(continue x y k3))|] @=? ["k3"]
]
qqTree :: TestTree
qqTree = testGroup "parser"
qq :: TestTree
qq = testGroup "parser"
[ testCase "lambda" do
assertEqual "" (Sut.MkLambda ["x","y"] "ktail"
(Sut.ExpContinue "ktail" [Sut.ValVar "x"]))