Skip to content

Commit

Permalink
revert part of #419 and put tests in a version check instead (#421)
Browse files Browse the repository at this point in the history
  • Loading branch information
fredrikekre authored Nov 30, 2017
1 parent 5ada727 commit 4aaff07
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -569,15 +569,17 @@ 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))
@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))
@test isa(A, Vector{Float32}) && size(A) == (5,) && all(x->x==val, A)
if VERSION < v"0.6.0-dev.1653"
for (A,val) in ((zeros(1:5, Float32, 3, 2), 0),
(ones(1:5, Float32, 3, 2), 1),
(zeros(1:5, Float32, (3, 2)), 0),
(ones(1:5, Float32, (3, 2)), 1))
@test isa(A, Matrix{Float32}) && size(A) == (3,2) && all(x->x==val, A)
end
for (A,val) in ((zeros(1:5, Float32), 0),
(ones(1:5, Float32), 1))
@test isa(A, Vector{Float32}) && size(A) == (5,) && all(x->x==val, A)
end
end

# PR 20203
Expand Down

0 comments on commit 4aaff07

Please sign in to comment.