Skip to content

Commit

Permalink
Make tests modular (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
jishnub authored Apr 17, 2024
1 parent a0682e0 commit 6d8418a
Show file tree
Hide file tree
Showing 10 changed files with 37 additions and 3 deletions.
1 change: 0 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using BlockBandedMatrices
using LinearAlgebra
using Test

using Aqua
Expand Down
8 changes: 6 additions & 2 deletions test/test_adjtransblockbanded.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
module TestAdjTransBlockBanded

using ArrayLayouts, BlockBandedMatrices, Test
import BlockBandedMatrices: BandedBlockBandedRowMajor, BandedBlockBandedRows,
BandedBlockBandedColumns, BlockBandedRows,
import BlockBandedMatrices: BandedBlockBandedRowMajor, BandedBlockBandedRows,
BandedBlockBandedColumns, BlockBandedRows,
BlockBandedColumns, blockcolsupport, blockrowsupport

@testset "Adj/Trans" begin
Expand Down Expand Up @@ -62,3 +64,5 @@ import BlockBandedMatrices: BandedBlockBandedRowMajor, BandedBlockBandedRows,
@test colsupport(E2', 1) == 1:0
end
end

end # module
4 changes: 4 additions & 0 deletions test/test_bandedblockbanded.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module TestBandedBlockBanded

using ArrayLayouts
using BandedMatrices
using BlockArrays
Expand Down Expand Up @@ -564,3 +566,5 @@ if false # turned off since tests have check-bounds=yes
BandedMatrices.inbands_setindex!(V, -2, 5, 1)
@test A[2,1] == -2
end

end # module
4 changes: 4 additions & 0 deletions test/test_blockbanded.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module TestBlockBanded

using ArrayLayouts
using BandedMatrices
using BlockArrays
Expand Down Expand Up @@ -246,3 +248,5 @@ import BlockBandedMatrices: MemoryLayout, ColumnMajor, BroadcastStyle,
@inferred(f(s))
end
end

end # module
4 changes: 4 additions & 0 deletions test/test_blockskyline.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module TestBlockSkyline

using ArrayLayouts
using BlockArrays
using BlockBandedMatrices
Expand Down Expand Up @@ -163,3 +165,5 @@ Random.seed!(0)
@test s == " 1 │ 0 0 │ ⋅ ⋅ ⋅ │ ⋅ ⋅ ⋅ ⋅"
end
end

end # module
4 changes: 4 additions & 0 deletions test/test_blockskylineqr.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module TestBlockSkylineQR

using BlockBandedMatrices
using BlockArrays
using LinearAlgebra
Expand Down Expand Up @@ -201,3 +203,5 @@ end
# @time F = qr(A); # 11s
# b = randn(size(A,1));
# @time F\b; # 0.6s

end # module
4 changes: 4 additions & 0 deletions test/test_broadcasting.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module TestBroadcasting

using ArrayLayouts
using BandedMatrices
using BlockArrays
Expand Down Expand Up @@ -287,3 +289,5 @@ import Base: oneto
end
end
end

end # module
4 changes: 4 additions & 0 deletions test/test_linalg.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module TestLinalg

using ArrayLayouts
using BandedMatrices
using BlockArrays
Expand Down Expand Up @@ -201,3 +203,5 @@ end
@test cholesky(Symmetric(Δ)).U cholesky(Matrix(Δ)).U
@test cholesky(Symmetric(Δ,:L)).U cholesky(Matrix(Δ)).U
end

end # module
3 changes: 3 additions & 0 deletions test/test_misc.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module TestMisc

using ArrayLayouts
using BandedMatrices
using BlockArrays
Expand Down Expand Up @@ -246,3 +248,4 @@ Base.size(F::FiniteDifference) = (F.n,F.n)
end
end

end # module
4 changes: 4 additions & 0 deletions test/test_triblockbanded.jl
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module TestTriBlockBanded

using ArrayLayouts
using BandedMatrices
using BlockArrays
Expand Down Expand Up @@ -209,3 +211,5 @@ import BlockArrays: blockisequal
@test UpperTriangular(V2) \ b UpperTriangular(V) \ b
end
end

end # module

0 comments on commit 6d8418a

Please sign in to comment.