Skip to content

Commit fc4c9d2

Browse files
authored
Remove NaN tests for Ord and Eq (#316)
* Remove NaN tests for Ord Fixes #306 * Remove all Ord/Eq tests for NaN
1 parent 2a51e60 commit fc4c9d2

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

test/Test/Main.purs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ testOrd x y ord =
3232
("(compare " <> show x <> " " <> show y <> " ) is not equal to " <> show ord)
3333
$ (compare x y) == ord
3434

35-
nan :: Number
36-
nan = 0.0/0.0
37-
3835
plusInfinity :: Number
3936
plusInfinity = 1.0/0.0
4037

@@ -43,8 +40,6 @@ minusInfinity = -1.0/0.0
4340

4441
testOrderings :: AlmostEff
4542
testOrderings = do
46-
assert "NaN shouldn't be equal to itself" $ nan /= nan
47-
assert "NaN shouldn't be equal to itself" $ (compare nan nan) /= EQ
4843
testOrd 1.0 2.0 LT
4944
testOrd 2.0 1.0 GT
5045
testOrd 1.0 (-2.0) GT
@@ -53,15 +48,6 @@ testOrderings = do
5348
testOrd minusInfinity 0.0 LT
5449
testOrd plusInfinity 0.0 GT
5550
testOrd plusInfinity minusInfinity GT
56-
testOrd 1.0 nan GT
57-
testOrd nan 1.0 GT
58-
testOrd nan plusInfinity GT
59-
testOrd plusInfinity nan GT
60-
assert "1 > NaN should be false" $ (1.0 > nan) == false
61-
assert "1 < NaN should be false" $ (1.0 < nan) == false
62-
assert "NaN > 1 should be false" $ (nan > 1.0) == false
63-
assert "NaN < 1 should be false" $ (nan < 1.0) == false
64-
assert "NaN == 1 should be false" $ nan /= 1.0
6551
testOrd (1 / 0) 0 EQ
6652
testOrd (mod 1 0) 0 EQ
6753
testOrd 'a' 'b' LT

0 commit comments

Comments
 (0)