Skip to content

Commit

Permalink
Add a test to avoid #53054 regressions (#53079)
Browse files Browse the repository at this point in the history
Tests issue #53054. The same test is included in backport #53074.
  • Loading branch information
pablosanjose authored Jan 30, 2024
1 parent 9edf1dd commit 3f468cd
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions stdlib/LinearAlgebra/test/blas.jl
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,19 @@ Random.seed!(100)
a[begin] = elty(NaN)
@test BLAS.nrm2(a) === abs2(elty(NaN))
end
@testset "deterministic mul!" begin
# mul! should be deterministic, see #53054
function tester_53054()
C = ComplexF32
mat = zeros(C, 1, 1)
for _ in 1:100
v = [C(1-0.2im) C(2+0.3im)]
mul!(mat, v, v', C(1+im), 1)
end
return mat
end
@test allequal(tester_53054() for _ in 1:10000)
end
@testset "scal" begin
α = rand(elty)
a = rand(elty,n)
Expand Down

0 comments on commit 3f468cd

Please sign in to comment.