Skip to content

Commit 70445bf

Browse files
committed
Increase coverage
1 parent 5de5cd0 commit 70445bf

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

src/ClassicalOrthogonalPolynomials.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ export OrthogonalPolynomial, Normalized, orthonormalpolynomial, LanczosPolynomia
4646
∞, Derivative, .., Inclusion,
4747
chebyshevt, chebyshevu, legendre, jacobi,
4848
legendrep, jacobip, ultrasphericalc, laguerrel,hermiteh, normalizedjacobip,
49-
jacobimatrix, jacobiweight, legendreweight, chebyshevtweight, chebyshevuweight
49+
jacobimatrix, jacobiweight, legendreweight, chebyshevtweight, chebyshevuweight, Weighted
5050

5151
if VERSION < v"1.6-"
5252
oneto(n) = Base.OneTo(n)

test/test_chebyshev.jl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,12 @@ import ContinuumArrays: MappedWeightedBasisLayout, Map
130130

131131
@testset "Weighted" begin
132132
WT = Weighted(ChebyshevT())
133+
@test WT == copy(WT)
134+
@test WT \ WT == Eye(∞)
133135
@test wT[0.1,1:10] WT[0.1,1:10]
134136
@test WT \ (exp.(x) ./ sqrt.(1 .- x.^2)) wT \ (exp.(x) ./ sqrt.(1 .- x.^2))
135137
@test WT[:,1:20] \ (exp.(x) ./ sqrt.(1 .- x.^2)) (WT \ (exp.(x) ./ sqrt.(1 .- x.^2)))[1:20]
138+
@test WT \ (x .* WT) == T \ (x .* T)
136139
end
137140

138141
@testset "mapped" begin

test/test_normalized.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using ClassicalOrthogonalPolynomials, FillArrays, BandedMatrices, ContinuumArrays, ArrayLayouts, LazyArrays, Base64, Test
1+
using ClassicalOrthogonalPolynomials, FillArrays, BandedMatrices, ContinuumArrays, ArrayLayouts, LazyArrays, Base64, LinearAlgebra, Test
22
import ClassicalOrthogonalPolynomials: NormalizedBasisLayout, recurrencecoefficients, Normalized, Clenshaw, weighted
33
import LazyArrays: CachedVector, PaddedLayout
44
import ContinuumArrays: MappedWeightedBasisLayout
@@ -80,6 +80,13 @@ import ContinuumArrays: MappedWeightedBasisLayout
8080
@testset "show" begin
8181
@test stringmime("text/plain", Normalized(Legendre())) == "Normalized(Legendre{Float64})"
8282
end
83+
84+
@testset "qr" begin
85+
P = Legendre()
86+
Q,R = qr(P)
87+
@test Q == Normalized(Legendre())
88+
@test R[1:10,1:10] == (P\Q)[1:10,1:10]
89+
end
8390
end
8491

8592
@testset "Chebyshev" begin

0 commit comments

Comments
 (0)