Skip to content

Commit

Permalink
Add equality test returning false even in the presence of missings
Browse files Browse the repository at this point in the history
  • Loading branch information
nalimilan committed Dec 7, 2017
1 parent f40832d commit be38d94
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/missing.jl
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,7 @@ end
@test Union{Int, Missing}[1] == Union{Float64, Missing}[1.0]
@test Union{Int, Missing}[1] == [1.0]
@test Union{Bool, Missing}[true] == BitArray([true])
@test !([missing, 1] == [missing, 2])
@test !(Union{Int, Missing}[1] == [2])
@test !([1] == Union{Int, Missing}[2])
@test !(Union{Int, Missing}[1] == Union{Int, Missing}[2])
Expand All @@ -217,6 +218,7 @@ end
@test !(Union{Int, Missing}[1] != Union{Float64, Missing}[1.0])
@test !(Union{Int, Missing}[1] != [1.0])
@test !(Union{Bool, Missing}[true] != BitArray([true]))
@test [missing, 1] != [missing, 2]
@test Union{Int, Missing}[1] != [2]
@test [1] != Union{Int, Missing}[2]
@test Union{Int, Missing}[1] != Union{Int, Missing}[2]
Expand All @@ -227,11 +229,13 @@ end
@test ismissing(("a", missing) == ("a", missing))
@test ismissing((missing,) == (missing,))
@test ismissing((missing, 2) == (1, missing))
@test !((missing, 1) == (missing, 2))

@test ismissing((1, missing) != (1, missing))
@test ismissing(("a", missing) != ("a", missing))
@test ismissing((missing,) != (missing,))
@test ismissing((missing, 2) != (1, missing))
@test (missing, 1) != (missing, 2)
end

@testset "any & all" begin
Expand Down

0 comments on commit be38d94

Please sign in to comment.