Skip to content

Commit d8e5410

Browse files
committed
Add aqua
1 parent 725b473 commit d8e5410

File tree

8 files changed

+43
-3
lines changed

8 files changed

+43
-3
lines changed

test/Project.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[deps]
2+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
23
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
34
OffsetArrays = "6fe1bfb0-de20-5000-8ca7-80f57d26f881"
45
Polynomials = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"

test/aqua.jl

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using SpecialMatrices: SpecialMatrices
2+
import Aqua
3+
using Test: @testset
4+
5+
@testset "aqua" begin
6+
Aqua.test_all(SpecialMatrices; ambiguities = false)
7+
end
8+
9+
#=
10+
todo: 1 ambiguity
11+
mul!(A::Matrix, B::AbstractMatrix, C::SpecialMatrices.Companion)
12+
SpecialMatrices/src/companion.jl:89
13+
mul!(C::AbstractMatrix, A::LinearAlgebra.AbstractTriangular, B::AbstractMatrix)
14+
LinearAlgebra/src/triangular.jl:691
15+
=#

test/cauchy.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# test/cauchy.jl
2+
3+
using SpecialMatrices: Cauchy
4+
using Test: @test, @test_throws, @inferred
5+
16
C = @inferred Cauchy(3)
27
@test 1 ./ C [2 3 4; 3 4 5; 4 5 6]
38
@test size(C) == (3,3)

test/companion.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# test/companion.jl
22

3+
using SpecialMatrices: Companion
4+
using Test: @test, @test_throws, @inferred
5+
36
import LinearAlgebra: mul!
47
using OffsetArrays: OffsetArray
58
import OffsetArrays # for no_offset_view

test/frobenius.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
# test/frobenius.jl
2+
3+
using SpecialMatrices: Frobenius
4+
using Test: @test, @test_throws, @inferred
15
using LinearAlgebra: I
26
import LinearAlgebra: mul!
37

test/hilbert.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# test/hilbert.jl
22

3+
using SpecialMatrices: Hilbert, InverseHilbert
4+
using LinearAlgebra: I, det, ishermitian, isposdef
5+
using Test: @test, @test_throws, @inferred
6+
37
n = 10
48
H = @inferred Hilbert(n)
59
@test H isa Hilbert

test/kahan.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# test/kahan.jl
22

3+
using SpecialMatrices: Kahan
4+
using Test: @test, @inferred
5+
36
m, n = 3, 5
47
A = Kahan(m, n, 0.5, 1e-3)
58

test/runtests.jl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
using SpecialMatrices
2-
using Test
3-
using LinearAlgebra
1+
using SpecialMatrices: SpecialMatrices
2+
using Test: @test_broken, @testset, detect_ambiguities
3+
4+
include("aqua.jl")
45

56
const files = (
67
"cauchy",
@@ -18,3 +19,7 @@ const files = (
1819
include("$f.jl")
1920
end
2021
end
22+
23+
@testset "ambiguities" begin
24+
@test_broken isempty(detect_ambiguities(SpecialMatrices)) # see aqua.jl
25+
end

0 commit comments

Comments
 (0)