Skip to content

Commit c1bd501

Browse files
committed
Use SafeTestsets in tests
1 parent ca0f713 commit c1bd501

8 files changed

Lines changed: 46 additions & 2 deletions

File tree

test/chainrules.jl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1+
using MatrixAlgebraKit
2+
using Test
3+
using TestExtras
4+
using StableRNGs
15
using ChainRulesCore, ChainRulesTestUtils, Zygote
26
using MatrixAlgebraKit: diagview, TruncatedAlgorithm, PolarViaSVD
3-
using LinearAlgebra: UpperTriangular, Diagonal, Hermitian
7+
using LinearAlgebra: UpperTriangular, Diagonal, Hermitian, mul!
48

59
function remove_svdgauge_depence!(ΔU, ΔVᴴ, U, S, Vᴴ;
610
degeneracy_atol=MatrixAlgebraKit.default_pullback_gaugetol(S))

test/eig.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
using MatrixAlgebraKit
2+
using Test
3+
using TestExtras
4+
using StableRNGs
5+
using LinearAlgebra: Diagonal
6+
using MatrixAlgebraKit: diagview
7+
18
@testset "eig_full! for T = $T" for T in (Float32, Float64, ComplexF32, ComplexF64)
29
rng = StableRNG(123)
310
m = 54

test/eigh.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
using MatrixAlgebraKit
2+
using Test
3+
using TestExtras
4+
using StableRNGs
5+
using LinearAlgebra: LinearAlgebra, Diagonal, I
6+
using MatrixAlgebraKit: diagview
7+
18
@testset "eigh_full! for T = $T" for T in (Float32, Float64, ComplexF32, ComplexF64)
29
rng = StableRNG(123)
310
m = 54

test/orthnull.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
using MatrixAlgebraKit
2+
using Test
3+
using TestExtras
4+
using StableRNGs
5+
using LinearAlgebra: LinearAlgebra, I
6+
17
@testset "left_orth and left_null for T = $T" for T in (Float32, Float64, ComplexF32,
28
ComplexF64)
39
rng = StableRNG(123)

test/polar.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
using MatrixAlgebraKit
2+
using Test
3+
using TestExtras
4+
using StableRNGs
5+
using LinearAlgebra: LinearAlgebra, I, isposdef
16
using MatrixAlgebraKit: PolarViaSVD
27

38
@testset "left_polar! for T = $T" for T in (Float32, Float64, ComplexF32, ComplexF64)

test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,17 @@ end
3232
@safetestset "Image and Null Space" begin
3333
include("orthnull.jl")
3434
end
35-
@safetestset "ChainRules" verbose = true begin
35+
@safetestset "ChainRules" begin
3636
include("chainrules.jl")
3737
end
3838

3939
@safetestset "MatrixAlgebraKit.jl" begin
4040
@safetestset "Code quality (Aqua.jl)" begin
41+
using Aqua
4142
Aqua.test_all(MatrixAlgebraKit)
4243
end
4344
@safetestset "Code linting (JET.jl)" begin
45+
using JET
4446
JET.test_package(MatrixAlgebraKit; target_defined_modules=true)
4547
end
4648
end

test/schur.jl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
using MatrixAlgebraKit
2+
using Test
3+
using TestExtras
4+
using StableRNGs
5+
using LinearAlgebra: I
6+
17
@testset "schur_full! for T = $T" for T in (Float32, Float64, ComplexF32, ComplexF64)
28
rng = StableRNG(123)
39
m = 54

test/svd.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
using MatrixAlgebraKit
2+
using Test
3+
using TestExtras
4+
using StableRNGs
5+
using LinearAlgebra: LinearAlgebra, Diagonal, I, isposdef
6+
using MatrixAlgebraKit: diagview
7+
18
@testset "svd_compact! for T = $T" for T in (Float32, Float64, ComplexF32, ComplexF64)
29
rng = StableRNG(123)
310
m = 54

0 commit comments

Comments
 (0)