1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-04 06:23:13 +03:00
juvix/test/Main.hs
Paul Cadman a091a7f63d
Update REPL artifacts with builtins from stored modules (#2639)
Builtin information needs to be propagated from stored modules to REPL
artifacts to avoid "The builtin _ has not been defined" errors.

This PR adds a test suite for the REPL in the Haskell test code. This
means some of the slow smoke tests can be moved to fast haskell unit
tests. In future we should refactor the REPL code by putting in the main
src target and unit testing more features (e.g :doc, :def).

* Closes https://github.com/anoma/juvix/issues/2638
2024-02-26 16:19:04 +00:00

65 lines
1.4 KiB
Haskell

module Main (main) where
import Anoma qualified
import Asm qualified
import BackendGeb qualified
import BackendMarkdown qualified
import Base
import Casm qualified
import Compilation qualified
import Core qualified
import Examples qualified
import Format qualified
import Formatter qualified
import Internal qualified
import Nockma qualified
import Package qualified
import Parsing qualified
import Reg qualified
import Repl qualified
import Resolver qualified
import Runtime qualified
import Scope qualified
import Termination qualified
import Tree qualified
import Typecheck qualified
import VampIR qualified
slowTests :: TestTree
slowTests =
testGroup
"Juvix slow tests"
[ BackendGeb.allTests,
Runtime.allTests,
Reg.allTests,
Asm.allTests,
Tree.allTests,
Core.allTests,
Internal.allTests,
Compilation.allTests,
Examples.allTests,
Casm.allTests,
VampIR.allTests,
Anoma.allTests,
Repl.allTests
]
fastTests :: TestTree
fastTests =
testGroup
"Juvix fast tests"
[ Parsing.allTests,
Resolver.allTests,
Scope.allTests,
Termination.allTests,
Typecheck.allTests,
Format.allTests,
Formatter.allTests,
Package.allTests,
BackendMarkdown.allTests,
Nockma.allTests
]
main :: IO ()
main = defaultMain (testGroup "Juvix tests" [fastTests, slowTests])