Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Add regression test module.

  • Loading branch information...
commit 7ef2aca5d24a34bfc3fc72df81a6e138b1b1ace5 1 parent 2845ae7
Bryan O'Sullivan authored
Showing with 18 additions and 1 deletion.
  1. +1 −1  tests/Makefile
  2. +15 −0 tests/Regression.hs
  3. +2 −0  tests/RunTests.hs
2  tests/Makefile
View
@@ -9,7 +9,7 @@ run-tests: tests
./tests
tests: ghc-flags += $(ghc-test-flags)
-tests: $(lib) Array.o Manager.o PSQ.o RunTests.o
+tests: $(lib) Array.o Manager.o PSQ.o Regression.o RunTests.o
ranlib $(lib)
$(ghc) $(ghc-flags) -threaded -o $@ $(filter %.o,$^) $(lib)
15 tests/Regression.hs
View
@@ -0,0 +1,15 @@
+module Regression (tests) where
+
+import Control.Exception (bracket)
+import Test.HUnit (Assertion, assertBool, assertEqual)
+import qualified System.Event as E
+import qualified Test.Framework as F
+import qualified Test.Framework.Providers.HUnit as F
+
+startupShutdown :: Assertion
+startupShutdown = E.new >>= E.shutdown
+
+tests :: F.Test
+tests = F.testGroup "Regression" [
+ F.testCase "startupShutdown" startupShutdown
+ ]
2  tests/RunTests.hs
View
@@ -3,10 +3,12 @@ import Test.Framework (defaultMain)
import qualified Array
import qualified Manager
import qualified PSQ
+import qualified Regression
main :: IO ()
main = withSocketsDo $ defaultMain tests
where tests = [ Array.tests
, Manager.tests
, PSQ.tests
+ , Regression.tests
]
Please sign in to comment.
Something went wrong with that request. Please try again.