grenade/test/test.hs

48 lines
1.2 KiB
Haskell
Raw Normal View History

2017-04-07 15:50:28 +03:00
import Control.Monad
2016-06-23 15:12:57 +03:00
2017-04-12 05:31:58 +03:00
import qualified Test.Grenade.Network
import qualified Test.Grenade.Layers.Pooling
import qualified Test.Grenade.Layers.Convolution
import qualified Test.Grenade.Layers.FullyConnected
2017-01-28 06:13:00 +03:00
import qualified Test.Grenade.Layers.Nonlinear
2017-02-03 15:56:47 +03:00
import qualified Test.Grenade.Layers.PadCrop
import qualified Test.Grenade.Layers.Internal.Convolution
import qualified Test.Grenade.Layers.Internal.Pooling
import qualified Test.Grenade.Recurrent.Layers.LSTM
2016-06-23 15:12:57 +03:00
2017-04-07 15:50:28 +03:00
import System.Exit
import System.IO
2016-06-23 15:12:57 +03:00
main :: IO ()
main =
disorderMain [
2017-04-12 05:31:58 +03:00
Test.Grenade.Network.tests
, Test.Grenade.Layers.Pooling.tests
2016-06-23 15:12:57 +03:00
, Test.Grenade.Layers.Convolution.tests
, Test.Grenade.Layers.FullyConnected.tests
2017-01-28 06:13:00 +03:00
, Test.Grenade.Layers.Nonlinear.tests
2017-02-03 15:56:47 +03:00
, Test.Grenade.Layers.PadCrop.tests
, Test.Grenade.Layers.Internal.Convolution.tests
, Test.Grenade.Layers.Internal.Pooling.tests
, Test.Grenade.Recurrent.Layers.LSTM.tests
2017-04-11 03:08:08 +03:00
2016-06-23 15:12:57 +03:00
]
2017-04-07 15:50:28 +03:00
disorderMain :: [IO Bool] -> IO ()
disorderMain tests = do
lineBuffer
rs <- sequence tests
unless (and rs) exitFailure
lineBuffer :: IO ()
lineBuffer = do
hSetBuffering stdout LineBuffering
hSetBuffering stderr LineBuffering