From 4f201671be1ee7b40b9529d10616d6b95291becb Mon Sep 17 00:00:00 2001 From: Rafael Fourquet Date: Thu, 19 Oct 2017 17:29:17 +0200 Subject: [PATCH] fix a seed for rand in a Lapack test (fix #24155) The seed was originally globally fixed in this file, but then locally scoped as a result of #16940. But it was needed in the "sysv" testset. --- test/linalg/lapack.jl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/test/linalg/lapack.jl b/test/linalg/lapack.jl index 7596c050484f3..4667b094c95ad 100644 --- a/test/linalg/lapack.jl +++ b/test/linalg/lapack.jl @@ -425,13 +425,15 @@ end @testset "sysv" begin @testset for elty in (Float32, Float64, Complex64, Complex128) - A = rand(elty,10,10) - A = A + A.' #symmetric! - b = rand(elty,10) - c = A \ b - b,A = LAPACK.sysv!('U',A,b) - @test b ≈ c - @test_throws DimensionMismatch LAPACK.sysv!('U',A,rand(elty,11)) + guardsrand(123) do + A = rand(elty,10,10) + A = A + A.' #symmetric! + b = rand(elty,10) + c = A \ b + b,A = LAPACK.sysv!('U',A,b) + @test b ≈ c + @test_throws DimensionMismatch LAPACK.sysv!('U',A,rand(elty,11)) + end end end