mirror of
https://github.com/barrucadu/dejafu.git
synced 2024-11-22 03:52:12 +03:00
Split up dejafu-tests main
This commit is contained in:
parent
cbbebdaf5e
commit
ccb4b9aa24
@ -68,8 +68,8 @@ library
|
||||
ghc-options: -Wall
|
||||
|
||||
executable dejafu-tests
|
||||
main-is: Main.hs
|
||||
|
||||
main-is: MainTest.hs
|
||||
other-modules: Util
|
||||
build-depends: base
|
||||
, dejafu-tests
|
||||
, tasty
|
||||
|
8
dejafu-tests/exe/MainTest.hs
Executable file
8
dejafu-tests/exe/MainTest.hs
Executable file
@ -0,0 +1,8 @@
|
||||
module Main where
|
||||
|
||||
import Test.Tasty (defaultMainWithIngredients)
|
||||
|
||||
import Util
|
||||
|
||||
main :: IO ()
|
||||
main = defaultMainWithIngredients ingredients tests
|
10
dejafu-tests/exe/Main.hs → dejafu-tests/exe/Util.hs
Executable file → Normal file
10
dejafu-tests/exe/Main.hs → dejafu-tests/exe/Util.hs
Executable file → Normal file
@ -1,17 +1,15 @@
|
||||
module Main where
|
||||
module Util (ingredients, tests) where
|
||||
|
||||
import qualified Test.Tasty as T
|
||||
import qualified Test.Tasty.Options as T
|
||||
import qualified Test.Tasty.Runners as T
|
||||
|
||||
import qualified Examples as E
|
||||
import qualified Integration as I
|
||||
import qualified Unit as U
|
||||
|
||||
main :: IO ()
|
||||
main =
|
||||
let ingredients = T.includingOptions options : T.defaultIngredients
|
||||
runner = T.defaultMainWithIngredients ingredients
|
||||
in runner tests
|
||||
ingredients :: [T.Ingredient]
|
||||
ingredients = T.includingOptions options : T.defaultIngredients
|
||||
|
||||
tests :: T.TestTree
|
||||
tests = T.testGroup "Tests"
|
Loading…
Reference in New Issue
Block a user