Skip to content

Commit 7ed514a

Browse files
committed
Fix tests in Julia 1.10 (cbrt(::Matrix) not defined)
1 parent 35233cb commit 7ed514a

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

test/test_basics.jl

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@ const elts = (Float32, Float64, ComplexF32, ComplexF64)
7979
end
8080

8181
@testset "FillArrays.Eye" begin
82+
MATRIX_FUNCTIONS = KroneckerArrays.MATRIX_FUNCTIONS
83+
if VERSION < v"1.11-"
84+
# `cbrt(::AbstractMatrix{<:Real})` was implemented in Julia 1.11.
85+
MATRIX_FUNCTIONS = setdiff(MATRIX_FUNCTIONS, [:cbrt])
86+
end
87+
8288
a = Eye(2) randn(3, 3)
8389
@test size(a) == (6, 6)
8490
@test a + a == Eye(2) (2a.b)
@@ -93,7 +99,7 @@ end
9399

94100
# Eye ⊗ A
95101
a = Eye(2) randn(3, 3)
96-
for f in KroneckerArrays.MATRIX_FUNCTIONS
102+
for f in MATRIX_FUNCTIONS
97103
@eval begin
98104
fa = $f($a)
99105
@test collect(fa) $f(collect($a))
@@ -113,7 +119,7 @@ end
113119

114120
# A ⊗ Eye
115121
a = randn(3, 3) Eye(2)
116-
for f in KroneckerArrays.MATRIX_FUNCTIONS
122+
for f in MATRIX_FUNCTIONS
117123
@eval begin
118124
fa = $f($a)
119125
@test collect(fa) $f(collect($a))

0 commit comments

Comments
 (0)