Split up dejafu-tests main

This commit is contained in:
Michael Walker 2018-06-24 09:55:28 +01:00
parent cbbebdaf5e
commit ccb4b9aa24
3 changed files with 14 additions and 8 deletions

View File

@ -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
View 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
View 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"