Skip to content

Commit

Permalink
Change ≅ to ≣ in numbers.jl tests
Browse files Browse the repository at this point in the history
  • Loading branch information
pabloferz committed Sep 20, 2016
1 parent 721ba7a commit e66a315
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions test/numbers.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# This file is a part of Julia. License is MIT: http://julialang.org/license

(a, b) = isequal(a, b) # convenient for comparing NaNs

# basic booleans
@test true
@test !false
Expand Down Expand Up @@ -54,41 +56,39 @@
@test 2.0 * 3.0 == 6.
@test min(1.0,1) == 1

const = isequal # convenient for comparing NaNs

# min, max and minmax
@test min(1) === 1
@test max(1) === 1
@test minmax(1) === (1, 1)
@test minmax(5, 3) == (3, 5)
@test minmax(3., 5.) == (3., 5.)
@test minmax(5., 3.) == (3., 5.)
@test minmax(3., NaN) (NaN, NaN)
@test minmax(NaN, 3) (NaN, NaN)
@test minmax(Inf, NaN) (NaN, NaN)
@test minmax(NaN, Inf) (NaN, NaN)
@test minmax(-Inf, NaN) (NaN, NaN)
@test minmax(NaN, -Inf) (NaN, NaN)
@test minmax(NaN, NaN) (NaN, NaN)
@test minmax(3., NaN) (NaN, NaN)
@test minmax(NaN, 3) (NaN, NaN)
@test minmax(Inf, NaN) (NaN, NaN)
@test minmax(NaN, Inf) (NaN, NaN)
@test minmax(-Inf, NaN) (NaN, NaN)
@test minmax(NaN, -Inf) (NaN, NaN)
@test minmax(NaN, NaN) (NaN, NaN)
@test min(-0.0,0.0) === min(0.0,-0.0)
@test max(-0.0,0.0) === max(0.0,-0.0)
@test minmax(-0.0,0.0) === minmax(0.0,-0.0)
@test max(-3.2, 5.1) == max(5.1, -3.2) == 5.1
@test min(-3.2, 5.1) == min(5.1, -3.2) == -3.2
@test max(-3.2, Inf) == max(Inf, -3.2) == Inf
@test max(-3.2, NaN) max(NaN, -3.2) NaN
@test max(-3.2, NaN) max(NaN, -3.2) NaN
@test min(5.1, Inf) == min(Inf, 5.1) == 5.1
@test min(5.1, -Inf) == min(-Inf, 5.1) == -Inf
@test min(5.1, NaN) min(NaN, 5.1) NaN
@test min(5.1, -NaN) min(-NaN, 5.1) NaN
@test min(5.1, NaN) min(NaN, 5.1) NaN
@test min(5.1, -NaN) min(-NaN, 5.1) NaN
@test minmax(-3.2, 5.1) == (min(-3.2, 5.1), max(-3.2, 5.1))
@test minmax(-3.2, Inf) == (min(-3.2, Inf), max(-3.2, Inf))
@test minmax(-3.2, NaN) (min(-3.2, NaN), max(-3.2, NaN))
@test (max(Inf,NaN), max(-Inf,NaN), max(Inf,-NaN), max(-Inf,-NaN)) (NaN,NaN,NaN,NaN)
@test (max(NaN,Inf), max(NaN,-Inf), max(-NaN,Inf), max(-NaN,-Inf)) (NaN,NaN,NaN,NaN)
@test (min(Inf,NaN), min(-Inf,NaN), min(Inf,-NaN), min(-Inf,-NaN)) (NaN,NaN,NaN,NaN)
@test (min(NaN,Inf), min(NaN,-Inf), min(-NaN,Inf), min(-NaN,-Inf)) (NaN,NaN,NaN,NaN)
@test minmax(-Inf,NaN) (min(-Inf,NaN), max(-Inf,NaN))
@test minmax(-3.2, NaN) (min(-3.2, NaN), max(-3.2, NaN))
@test (max(Inf,NaN), max(-Inf,NaN), max(Inf,-NaN), max(-Inf,-NaN)) (NaN,NaN,NaN,NaN)
@test (max(NaN,Inf), max(NaN,-Inf), max(-NaN,Inf), max(-NaN,-Inf)) (NaN,NaN,NaN,NaN)
@test (min(Inf,NaN), min(-Inf,NaN), min(Inf,-NaN), min(-Inf,-NaN)) (NaN,NaN,NaN,NaN)
@test (min(NaN,Inf), min(NaN,-Inf), min(-NaN,Inf), min(-NaN,-Inf)) (NaN,NaN,NaN,NaN)
@test minmax(-Inf,NaN) (min(-Inf,NaN), max(-Inf,NaN))

# fma
let x = Int64(7)^7
Expand Down

0 comments on commit e66a315

Please sign in to comment.