File: test.hs

package info (click to toggle)
haskell-concurrent-extra 0.7.0.12-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 184 kB
  • sloc: haskell: 1,040; makefile: 6
file content (42 lines) | stat: -rw-r--r-- 1,567 bytes parent folder | download | duplicates (2)
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
{-# LANGUAGE NoImplicitPrelude #-}

module Main where

-------------------------------------------------------------------------------
-- Imports
-------------------------------------------------------------------------------

-- from base:
import System.IO ( IO )

-- from concurrent-extra:
import qualified Control.Concurrent.Event.Test         as Event     ( tests )
import qualified Control.Concurrent.Lock.Test          as Lock      ( tests )
import qualified Control.Concurrent.STM.Lock.Test      as STM.Lock  ( tests )
import qualified Control.Concurrent.RLock.Test         as RLock     ( tests )
import qualified Control.Concurrent.Broadcast.Test     as Broadcast ( tests )
import qualified Control.Concurrent.ReadWriteLock.Test as RWLock    ( tests )
import qualified Control.Concurrent.ReadWriteVar.Test  as RWVar     ( tests )

-- from test-framework:
import Test.Framework ( Test, defaultMain, testGroup )


-------------------------------------------------------------------------------
-- Tests
-------------------------------------------------------------------------------

main :: IO ()
main = defaultMain tests

tests :: [Test]
tests = [ testGroup "Pessimistic locking"
          [ testGroup "Event"         Event.tests
          , testGroup "Lock"          Lock.tests
          , testGroup "STM.Lock"      STM.Lock.tests
          , testGroup "RLock"         RLock.tests
          , testGroup "Broadcast"     Broadcast.tests
          , testGroup "ReadWriteLock" RWLock.tests
          , testGroup "ReadWriteVar"  RWVar.tests
          ]
        ]