1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-13 11:16:48 +03:00
juvix/test/Reg/Run/Positive.hs
Łukasz Czajka a110297a69
JuvixReg interpreter (#2635)
* Closes #2577 
* Adds the `juvix dev reg run file.jvr` command.
* Adds interpreter tests.
2024-02-15 10:46:19 +01:00

25 lines
620 B
Haskell

module Reg.Run.Positive where
import Base
import Reg.Parse.Positive qualified as Parse
import Reg.Run.Base
type PosTest = Parse.PosTest
testDescr :: PosTest -> TestDescr
testDescr Parse.PosTest {..} =
let tRoot = Parse.root <//> _relDir
file' = tRoot <//> _file
expected' = tRoot <//> _expectedFile
in TestDescr
{ _testName = _name,
_testRoot = tRoot,
_testAssertion = Steps $ regRunAssertion file' expected' return (const (return ()))
}
allTests :: TestTree
allTests =
testGroup
"JuvixReg parsing positive tests"
(map (mkTest . testDescr) Parse.tests)