Skip to content

Commit a1766aa

Browse files
kshyatttkelman
authored andcommitted
Early-exit and pass-through tests
(cherry picked from commit 449c6da) ref #13354 removed tests for methods that have not been backported to release-0.4
1 parent 0f09590 commit a1766aa

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

test/linalg/lapack.jl

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,7 @@ end
241241
#orglq and friends errors
242242
for elty in (Float32, Float64, Complex64, Complex128)
243243
A = rand(elty,10,10)
244-
tau = zeros(elty,10)
245-
A,tau = LAPACK.gelqf!(A,tau)
244+
A,tau = LAPACK.gelqf!(A)
246245
@test_throws DimensionMismatch LAPACK.orglq!(A,tau,11)
247246
@test_throws DimensionMismatch LAPACK.ormlq!('R','N',A,tau,rand(elty,11,11))
248247
@test_throws DimensionMismatch LAPACK.ormlq!('L','N',A,tau,rand(elty,11,11))
@@ -254,8 +253,7 @@ for elty in (Float32, Float64, Complex64, Complex128)
254253
@test LAPACK.ormlq!('R','N',A,tau,eye(elty,10)) C
255254

256255
A = rand(elty,10,10)
257-
tau = zeros(elty,10)
258-
A,tau = LAPACK.geqrf!(A,tau)
256+
A,tau = LAPACK.geqrf!(A)
259257
@test_throws DimensionMismatch LAPACK.orgqr!(A,tau,11)
260258
B = copy(A)
261259
@test LAPACK.orgqr!(B,tau) LAPACK.ormqr!('R','N',A,tau,eye(elty,10))
@@ -264,6 +262,12 @@ for elty in (Float32, Float64, Complex64, Complex128)
264262
@test_throws DimensionMismatch LAPACK.ormqr!('R','N',A,zeros(elty,11),rand(elty,10,10))
265263
@test_throws DimensionMismatch LAPACK.ormqr!('L','N',A,zeros(elty,11),rand(elty,10,10))
266264

265+
A = rand(elty,10,10)
266+
A,tau = LAPACK.geqlf!(A)
267+
268+
A = rand(elty,10,10)
269+
A,tau = LAPACK.gerqf!(A)
270+
267271
C = rand(elty,10,10)
268272
V = rand(elty,10,10)
269273
T = zeros(elty,10,11)
@@ -418,6 +422,8 @@ for elty in (Float32, Float64, Complex64, Complex128)
418422
@test_approx_eq A\B C
419423
@test_throws DimensionMismatch LAPACK.posv!('U',D,ones(elty,12,12))
420424
@test_throws DimensionMismatch LAPACK.potrs!('U',D,ones(elty,12,12))
425+
426+
@test LAPACK.potrs!('U',zeros(elty,0,0),ones(elty,0)) == ones(elty,0)
421427
end
422428

423429
#gesvx

0 commit comments

Comments
 (0)