Skip to content

Commit

Permalink
better test for #19265
Browse files Browse the repository at this point in the history
  • Loading branch information
jw3126 committed Dec 18, 2016
1 parent dbbe516 commit d16b6ea
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion test/arrayops.jl
Original file line number Diff line number Diff line change
Expand Up @@ -1953,5 +1953,11 @@ end
zs = zeros(SparseMatrixCSC([1 2; 3 4]), Complex{Float64}, (2,3))
test_zeros(zs, SparseMatrixCSC{Complex{Float64}}, (2, 3))

@test_throws MethodError zeros(Float64, [1.]) #19265
@testset "#19265" begin
@test_throws MethodError zeros(Float64, [1.])
x = [1.]
test_zeros(zeros(x, Float64), Vector{Float64}, (1,))
@test x == [1.]
end

end

0 comments on commit d16b6ea

Please sign in to comment.