From 4aaff0777481d04470f5a7261d738a22e8ecf1c5 Mon Sep 17 00:00:00 2001 From: Fredrik Ekre Date: Thu, 30 Nov 2017 20:04:14 +0100 Subject: [PATCH] revert part of #419 and put tests in a version check instead (#421) --- test/runtests.jl | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/test/runtests.jl b/test/runtests.jl index 1f5e1c47b..b842ec337 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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