Skip to content

Commit 1eec4c9

Browse files
committed
Fix tests
1 parent 5ac1cbc commit 1eec4c9

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

test/test_basics.jl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@ elts = (Float32, Float64, ComplexF32, ComplexF64)
8888
end
8989
@test x == y
9090

91-
a = @constinferred(randn(elt, 2, 2) randn(elt, 3, 3))
92-
b = @constinferred(randn(elt, 2, 2) randn(elt, 3, 3))
91+
rng = StableRNG(123)
92+
a = @constinferred(randn(rng, elt, 2, 2) randn(rng, elt, 3, 3))
93+
b = @constinferred(randn(rng, elt, 2, 2) randn(rng, elt, 3, 3))
9394
c = @constinferred(a.arg1 b.arg2)
9495
@test a isa KroneckerArray{elt,2,typeof(a.arg1),typeof(a.arg2)}
9596
@test similar(typeof(a), (2, 3)) isa Matrix{elt}

test/test_matrixalgebrakit_delta.jl

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,12 @@ herm(a) = parent(hermitianpart(a))
121121
left_orth, right_orth, left_polar, right_polar, qr_compact, lq_compact, qr_full, lq_full
122122
)
123123
a = δ(3, 3) randn(3, 3)
124-
x, y = @constinferred f($a)
124+
if VERSION v"1.11-"
125+
x, y = @constinferred f($a)
126+
else
127+
# Type inference fails in Julia 1.10.
128+
x, y = f(a)
129+
end
125130
@test x * y a
126131
@test arguments(x, 1) isa DeltaMatrix
127132
@test arguments(y, 1) isa DeltaMatrix

0 commit comments

Comments
 (0)