mirror of
https://github.com/anoma/juvix.git
synced 2024-12-12 14:28:08 +03:00
39 lines
961 B
Haskell
39 lines
961 B
Haskell
|
module Core.VampIR.LetHoist where
|
||
|
|
||
|
import Base
|
||
|
import Core.Normalize.Positive (PosTest (..))
|
||
|
import Core.Normalize.Positive qualified as Normalize
|
||
|
import Core.VampIR.Base
|
||
|
import Juvix.Compiler.Core.Data.TransformationId
|
||
|
|
||
|
fromTest :: PosTest -> TestTree
|
||
|
fromTest = mkTest . toTestDescr
|
||
|
|
||
|
toTestDescr :: PosTest -> TestDescr
|
||
|
toTestDescr = Normalize.toTestDescr' (coreVampIRAssertion [LetHoisting])
|
||
|
|
||
|
allTests :: TestTree
|
||
|
allTests =
|
||
|
testGroup
|
||
|
"JuvixCore VampIR let-hoist positive tests"
|
||
|
(map (mkTest . toTestDescr) tests)
|
||
|
|
||
|
tests :: [PosTest]
|
||
|
tests =
|
||
|
[ PosTest
|
||
|
"Test010: Lets"
|
||
|
$(mkRelDir ".")
|
||
|
$(mkRelFile "test010.jvc")
|
||
|
$(mkRelFile "data/test010.json"),
|
||
|
PosTest
|
||
|
"Test028: Let hoisting"
|
||
|
$(mkRelDir ".")
|
||
|
$(mkRelFile "test028.jvc")
|
||
|
$(mkRelFile "data/test028.json"),
|
||
|
PosTest
|
||
|
"Test029: Let hoisting"
|
||
|
$(mkRelDir ".")
|
||
|
$(mkRelFile "test029.jvc")
|
||
|
$(mkRelFile "data/test029.json")
|
||
|
]
|