summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghc-regress/codeGen/should_run/5129.hs
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests/ghc-regress/codeGen/should_run/5129.hs')
-rw-r--r--testsuite/tests/ghc-regress/codeGen/should_run/5129.hs21
1 files changed, 0 insertions, 21 deletions
diff --git a/testsuite/tests/ghc-regress/codeGen/should_run/5129.hs b/testsuite/tests/ghc-regress/codeGen/should_run/5129.hs
deleted file mode 100644
index 6bc1912754..0000000000
--- a/testsuite/tests/ghc-regress/codeGen/should_run/5129.hs
+++ /dev/null
@@ -1,21 +0,0 @@
-{-# LANGUAGE DeriveDataTypeable #-}
-import Control.Exception as E
-import Data.Typeable
-
-throwIfNegative :: Int -> String
-throwIfNegative n | n < 0 = error "negative"
- | otherwise = "no worries"
-{-# NOINLINE throwIfNegative #-}
-
-data HUnitFailure = HUnitFailure String deriving (Show,Typeable)
-instance Exception HUnitFailure
-
-assertFailure msg = E.throw (HUnitFailure msg)
-
-case_negative =
- handleJust errorCalls (const $ return ()) $ do
- evaluate $ throwIfNegative (-1)
- assertFailure "must throw when given a negative number"
- where errorCalls (ErrorCall _) = Just ()
-
-main = case_negative