{-# LANGUAGE CPP #-}
module Main where
import Test.HUnit
import System.Exit
import System.IO ( stdout )
import qualified ShapeSyb
import Debug.Trace ( trace )
tests =
"All" ~: [ ShapeSyb.tests
]
main = do
putStrLn "Running tests for shape-syb..."
#if 0
#if 0
f :: String -> Bool -> () -> IO ()
f s b _ = putStrLn return ()
#endif
(counts,_) <- runTestText (putTextToHandle stdout False) tests
-- (counts,_) <- runTestText (putTextToHandle stdout False) ((tests!!0)!!0)
-- (counts,_) <- runTestText (putTextToHandle stdout False) (tests!!0)
#else
counts <- runTestTT tests
#endif
#if 0
log <- readFile "dist/test/sai-shape-syb-0.2.0-unit-tests.log"
-- putStrLn log
if ( trace log ) $ failures counts > 0
#endif
if failures counts > 0
#if 1
then exitFailure
else exitSuccess
#else
-- XXX Why is this saying "unexpected semicolons in source file"??
-- Template Haskell or something?...
then exitFailure
else exitSuccess
#endif