We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bb5b04 commit bf4f733Copy full SHA for bf4f733
test/ArrayFire/ArithSpec.hs
@@ -7,6 +7,7 @@ import Test.Hspec
7
import Foreign.C
8
9
import qualified ArrayFire as A
10
+import qualified System.Exit as E
11
12
spec :: Spec
13
spec =
@@ -101,3 +102,10 @@ actual `shouldBeEps` expected = expect err_msg (cmpEps actual expected)
101
102
let x :: Double
103
x = fromIntegral $ Prelude.abs $ actual - expected
104
in x <= 1e-14
105
+
106
+expect :: String -> Bool -> Expectation
107
+expect label f = if f
108
+ then pure ()
109
+ else do
110
+ putStrLn label
111
+ E.exitFailure
0 commit comments