mirror of
https://github.com/anoma/juvix.git
synced 2024-12-15 01:52:11 +03:00
3b3ea45da9
* Renaming MiniJuvix to Juvix * Make Ormolu happy * Make Hlint happy * Remove redundant imports * Fix shell tests and add target ci to our Makefile * Make pre-commit happy
47 lines
984 B
Haskell
47 lines
984 B
Haskell
module MonoJuvix.Positive where
|
|
|
|
import Base
|
|
import Juvix.Pipeline
|
|
|
|
data PosTest = PosTest
|
|
{ _name :: String,
|
|
_relDir :: FilePath,
|
|
_file :: FilePath
|
|
}
|
|
|
|
root :: FilePath
|
|
root = "tests/positive"
|
|
|
|
testDescr :: PosTest -> TestDescr
|
|
testDescr PosTest {..} =
|
|
let tRoot = root </> _relDir
|
|
in TestDescr
|
|
{ _testName = _name,
|
|
_testRoot = tRoot,
|
|
_testAssertion = Single $ do
|
|
let entryPoint = defaultEntryPoint _file
|
|
(void . runIO) (upToMonoJuvix entryPoint)
|
|
}
|
|
|
|
allTests :: TestTree
|
|
allTests =
|
|
testGroup
|
|
"MonoJuvix positive tests"
|
|
(map (mkTest . testDescr) tests)
|
|
|
|
tests :: [PosTest]
|
|
tests =
|
|
[ PosTest
|
|
"General example"
|
|
"."
|
|
"Polymorphism.juvix",
|
|
PosTest
|
|
"Polymorphic Simple Fungible Token"
|
|
"FullExamples"
|
|
"SimpleFungibleTokenImplicit.juvix",
|
|
PosTest
|
|
"Polymorphism and higher rank functions with explicit holes"
|
|
"."
|
|
"PolymorphismHoles.juvix"
|
|
]
|