diff --git a/test/ArrayFire/ArithSpec.hs b/test/ArrayFire/ArithSpec.hs index 1220087..a858462 100644 --- a/test/ArrayFire/ArithSpec.hs +++ b/test/ArrayFire/ArithSpec.hs @@ -98,9 +98,10 @@ shouldBeEps :: Array Double -> Array Double -> Expectation actual `shouldBeEps` expected = expect err_msg (cmpEps actual expected) where err_msg = "expected: " ++ show expected ++ "\n but got: " ++ show actual + cmpEps :: Array Double -> Array Double -> Bool cmpEps a b = let x :: Double - x = fromIntegral $ Prelude.abs $ a - b + x = getScalar $ Prelude.abs $ a - b in x <= 1e-14 expect :: String -> Bool -> Expectation