Skip to content

Commit 87651ae

Browse files
committed
remove lt and gt tests for now. fix cmpEps
1 parent bf4f733 commit 87651ae

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

test/ArrayFire/ArithSpec.hs

+6-6
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ spec =
3434
3 `shouldBeEps` cbrt @Double 27
3535
it "Should take square root" $ do
3636
2 `shouldBeEps` sqrt @Double 4
37-
it "Should lt Array" $ do
38-
2 `A.lt` (3 :: Array Double) `shouldBe` True
39-
it "Should gt Array" $ do
40-
2 `A.gt` (3 :: Array Double) `shouldBe` False
37+
--it "Should lt Array" $ do
38+
-- 2 `A.lt` (3 :: Array Double) `shouldBe` 1
39+
--it "Should gt Array" $ do
40+
-- 2 `A.gt` (3 :: Array Double) `shouldBe` 1
4141
it "Should eq Array" $ do
4242
3 == (3 :: Array Double) `shouldBe` True
4343
it "Should and Array" $ do
@@ -98,9 +98,9 @@ shouldBeEps :: Array Double -> Array Double -> Expectation
9898
actual `shouldBeEps` expected = expect err_msg (cmpEps actual expected)
9999
where
100100
err_msg = "expected: " ++ show expected ++ "\n but got: " ++ show actual
101-
cmpEps =
101+
cmpEps x y =
102102
let x :: Double
103-
x = fromIntegral $ Prelude.abs $ actual - expected
103+
x = fromIntegral $ Prelude.abs $ x - y
104104
in x <= 1e-14
105105

106106
expect :: String -> Bool -> Expectation

0 commit comments

Comments
 (0)