-- ---------------------------------------------------------------------
-- testing for failure and help out hpc
--
-- Since base 4.9.0.0 `error` appends a stack trace. The tests below
-- use `isPrefixOf` to only test equality on the error message.
--
prop_abort :: Int -> Bool
prop_abort _ = unsafePerformIO $ C.catch (abort "fail") check
   where
     check (C.SomeException e) =
       return $ "xmonad: StackSet: fail" `isPrefixOf` show e

-- new should fail with an abort
prop_abort :: Int -> Bool
prop_abort _ = unsafePerformIO $ C.catch (abort "fail") check
   where
     check (C.SomeException e) =
       return $ "xmonad: StackSet: fail" `isPrefixOf` show e

-- new should fail with an abort
prop_abort _ = unsafePerformIO $ C.catch (abort "fail") check
   where
     check (C.SomeException e) =
       return $ "xmonad: StackSet: fail" `isPrefixOf` show e

-- new should fail with an abort