Skip to content

Commit

Permalink
react to review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
MaximilianAlgehed committed Mar 19, 2024
1 parent c5443a7 commit 49d2f46
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/DiscardRatio.hs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
module Main where

import Test.QuickCheck
import Control.Monad
import System.Exit
import Test.QuickCheck

assert :: String -> Bool -> IO ()
assert s False = do
Expand All @@ -12,14 +13,10 @@ assert _ _ = pure ()
quickCheckYes, quickCheckNo :: Property -> IO ()
quickCheckYes p = do
res <- quickCheckResult p
if isSuccess res
then pure ()
else exitFailure
unless (isSuccess res) exitFailure
quickCheckNo p = do
res <- quickCheckResult p
if isSuccess res
then exitFailure
else pure ()
when (isSuccess res) exitFailure

check :: Result -> Int -> Int -> IO ()
check res n d = do
Expand Down

0 comments on commit 49d2f46

Please sign in to comment.