summaryrefslogtreecommitdiff
path: root/tests/Main.hs
blob: 3c7d5e031a855e912775e937c9a48a0eb3b03b8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DoAndIfThenElse #-}
{-# LANGUAGE TupleSections #-}
{-# LANGUAGE FlexibleInstances #-}

module Main (main) where

import Prelude ()
import Prelude.Compat

import Test.Tasty

import qualified TestCst
import qualified TestCompiler
import qualified TestCoreFn
import qualified TestDocs
import qualified TestHierarchy
import qualified TestPrimDocs
import qualified TestPsci
import qualified TestIde
import qualified TestPscPublish
import qualified TestBundle
import qualified TestMake
import qualified TestUtils

import System.IO (hSetEncoding, stdout, stderr, utf8)

main :: IO ()
main = do
  hSetEncoding stdout utf8
  hSetEncoding stderr utf8

  heading "Updating support code"
  TestUtils.updateSupportCode

  cstTests <- TestCst.main
  ideTests <- TestIde.main
  compilerTests <- TestCompiler.main
  makeTests <- TestMake.main
  psciTests <- TestPsci.main
  pscBundleTests <- TestBundle.main
  coreFnTests <- TestCoreFn.main
  docsTests <- TestDocs.main
  primDocsTests <- TestPrimDocs.main
  publishTests <- TestPscPublish.main
  hierarchyTests <- TestHierarchy.main

  defaultMain $
    testGroup
      "Tests"
      [ cstTests
      , compilerTests
      , makeTests
      , psciTests
      , pscBundleTests
      , ideTests
      , coreFnTests
      , docsTests
      , primDocsTests
      , publishTests
      , hierarchyTests
      ]

  where
  heading msg = do
    putStrLn ""
    putStrLn $ replicate 79 '#'
    putStrLn $ "# " ++ msg
    putStrLn $ replicate 79 '#'
    putStrLn ""