Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions test/adjtrans.jl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test")
isdefined(Main, :OffsetArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "OffsetArrays.jl"))
using .Main.OffsetArrays

isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

@testset "Adjoint and Transpose inner constructor basics" begin
intvec, intmat = [1, 2], [1 2; 3 4]
# Adjoint/Transpose eltype must match the type of the Adjoint/Transpose of the input eltype
Expand Down Expand Up @@ -250,9 +253,6 @@ end
@test convert(Transpose{Float64,Matrix{Float64}}, Transpose(intmat))::Transpose{Float64,Matrix{Float64}} == Transpose(intmat)
end

isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

@testset "Adjoint and Transpose convert methods to AbstractArray" begin
# tests corresponding to #34995
intvec, intmat = [1, 2], [1 2 3; 4 5 6]
Expand Down Expand Up @@ -593,9 +593,6 @@ end
@test pointer(Transpose(D)) === pointer(D)
end

isdefined(Main, :OffsetArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "OffsetArrays.jl"))
using .Main.OffsetArrays

@testset "offset axes" begin
s = Base.Slice(-3:3)'
@test axes(s) === (Base.OneTo(1), Base.IdentityUnitRange(-3:3))
Expand Down
6 changes: 3 additions & 3 deletions test/bidiag.jl
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ using .Main.OffsetArrays
isdefined(Main, :SizedArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "SizedArrays.jl"))
using .Main.SizedArrays

isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

include("testutils.jl") # test_approx_eq_modphase

n = 10 #Size of test matrix
Expand Down Expand Up @@ -787,9 +790,6 @@ end
@test c \ A ≈ c \ Matrix(A)
end

isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

@testset "Conversion to AbstractArray" begin
# tests corresponding to #34995
dv = ImmutableArray([1, 2, 3, 4])
Expand Down
7 changes: 3 additions & 4 deletions test/diagonal.jl
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ using .Main.FillArrays
isdefined(Main, :SizedArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "SizedArrays.jl"))
using .Main.SizedArrays

isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

const n=12 # Size of matrix problem to test
Random.seed!(1)

Expand Down Expand Up @@ -1127,10 +1130,6 @@ end
end
end

const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test")
isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

@testset "Conversion to AbstractArray" begin
# tests corresponding to #34995
d = ImmutableArray([1, 2, 3, 4])
Expand Down
6 changes: 3 additions & 3 deletions test/hessenberg.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test")
isdefined(Main, :SizedArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "SizedArrays.jl"))
using .Main.SizedArrays

isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

# for tuple tests below
≅(x,y) = all(p -> p[1] ≈ p[2], zip(x,y))

Expand Down Expand Up @@ -218,9 +221,6 @@ end
end
end

isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

@testset "Conversion to AbstractArray" begin
# tests corresponding to #34995
A = ImmutableArray([1 2 3; 4 5 6; 7 8 9])
Expand Down
7 changes: 3 additions & 4 deletions test/symmetric.jl
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ using .Main.Quaternions
isdefined(Main, :SizedArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "SizedArrays.jl"))
using .Main.SizedArrays

isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

Random.seed!(1010)

@testset "Pauli σ-matrices: $σ" for σ in map(Hermitian,
Expand Down Expand Up @@ -722,10 +725,6 @@ end
end
end

const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test")
isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

@testset "Conversion to AbstractArray" begin
# tests corresponding to #34995
immutablemat = ImmutableArray([1 2 3; 4 5 6; 7 8 9])
Expand Down
6 changes: 3 additions & 3 deletions test/triangular.jl
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ using .Main.SizedArrays
isdefined(Main, :FillArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "FillArrays.jl"))
using .Main.FillArrays

isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

n = 9
Random.seed!(123)

Expand Down Expand Up @@ -243,9 +246,6 @@ end
# dimensional correctness:
const BASE_TEST_PATH = joinpath(Sys.BINDIR, "..", "share", "julia", "test")

isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

@testset "AbstractArray constructor should preserve underlying storage type" begin
# tests corresponding to #34995
local m = 4
Expand Down
8 changes: 3 additions & 5 deletions test/tridiag.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ using .Main.OffsetArrays
isdefined(Main, :SizedArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "SizedArrays.jl"))
using .Main.SizedArrays

isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

include("testutils.jl") # test_approx_eq_modphase

#Test equivalence of eigenvectors/singular vectors taking into account possible phase (sign) differences
Expand Down Expand Up @@ -769,9 +772,6 @@ end
@test ishermitian(S)
end

isdefined(Main, :ImmutableArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "ImmutableArrays.jl"))
using .Main.ImmutableArrays

@testset "Conversion to AbstractArray" begin
# tests corresponding to #34995
v1 = ImmutableArray([1, 2])
Expand All @@ -796,8 +796,6 @@ end
end
end

isdefined(Main, :SizedArrays) || @eval Main include(joinpath($(BASE_TEST_PATH), "testhelpers", "SizedArrays.jl"))
using .Main.SizedArrays
@testset "non-number eltype" begin
@testset "sum for SymTridiagonal" begin
dv = [SizedArray{(2,2)}(rand(1:2048,2,2)) for i in 1:10]
Expand Down