Skip to content

Commit

Permalink
use == to compare to Union{Bool,Int} in broadcast test
Browse files Browse the repository at this point in the history
otherwise we can run into `Union{Bool,Int} !== Union{Int,Bool}`
  • Loading branch information
JeffBezanson committed Jul 14, 2017
1 parent e521c8a commit 1e61e4f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/broadcast.jl
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ end
let f17314 = x -> x < 0 ? false : x
@test eltype(broadcast(f17314, 1:3)) === Int
@test eltype(broadcast(f17314, -1:1)) === Integer
@test eltype(broadcast(f17314, Int[])) === Union{Bool,Int}
@test eltype(broadcast(f17314, Int[])) == Union{Bool,Int}
end
let io = IOBuffer()
broadcast(x->print(io,x), 1:5) # broadcast with side effects
Expand Down

0 comments on commit 1e61e4f

Please sign in to comment.