Skip to content

Commit 232a8c5

Browse files
committed
Remove all Ord/Eq tests for NaN
1 parent 2bddb7a commit 232a8c5

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

test/Test/Main.purs

Lines changed: 0 additions & 10 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,11 +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 "NaN == 1 should be false" $ nan /= 1.0
6151
testOrd (1 / 0) 0 EQ
6252
testOrd (mod 1 0) 0 EQ
6353
testOrd 'a' 'b' LT

0 commit comments

Comments
 (0)