Skip to content

Commit

Permalink
update deprecated array constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre committed Nov 30, 2017
1 parent 5ada727 commit 2bc1a3c
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -569,14 +569,14 @@ let a = CompatArray.CartesianArray(rand(2,3)), b = CompatArray.LinearArray(rand(
@test IndexStyle(b) === IndexLinear()
end

for (A,val) in ((fill!(Array{Float32}(3, 2), 0), 0),
(fill!(Array{Float32}(3, 2), 1), 1),
(fill!(Array{Float32}(3, 2), 0), 0),
(fill!(Array{Float32}(3, 2), 1), 1))
for (A,val) in ((fill(0f0, (3, 2)), 0),
(fill(1f0, (3, 2)), 1),
(fill(0f0, (3, 2)), 0),
(fill(1f0, (3, 2)), 1))
@test isa(A, Matrix{Float32}) && size(A) == (3,2) && all(x->x==val, A)
end
for (A,val) in ((fill!(Array{Float32}(5), 0), 0),
(fill!(Array{Float32}(5), 1), 1))
for (A,val) in ((fill(0f0, (5,)), 0),
(fill(1f0, (5,)), 1))
@test isa(A, Vector{Float32}) && size(A) == (5,) && all(x->x==val, A)
end

Expand Down

0 comments on commit 2bc1a3c

Please sign in to comment.