Skip to content

Commit bce1637

Browse files
committed
Add tests
1 parent 796fb38 commit bce1637

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/bases/bases.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -690,6 +690,7 @@ diff_layout(::ExpansionLayout, A, dims...) = diff_layout(ApplyLayout{typeof(*)}(
690690
####
691691

692692
simplifiable(::Mul{<:AdjointBasisLayout, <:AbstractBasisLayout}) = Val(true)
693+
@inline simplifiable(L::Mul{<:AdjointBasisLayout,ApplyLayout{typeof(*)}}) = simplifiable(*, L.A, first(arguments(*, L.B)))
693694
function copy(M::Mul{<:AdjointBasisLayout, <:AbstractBasisLayout})
694695
A = (M.A)'
695696
A == M.B && return grammatrix(A)

test/test_chebyshev.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ Base.:(==)(::FooBasis, ::FooBasis) = true
167167
@test T'isa Vector
168168
@test T'*(ã .* ã) isa Vector
169169
@test (2T)'*(a .* T) isa Matrix
170+
@test T'*(2T) isa Matrix
171+
@test T'*(2T*randn(5)) isa Vector
172+
@test LazyArrays.simplifiable(*, T', T*(1:5)) == Val(true)
173+
@test (2T)'*(T*(1:5)) T'*(2T*(1:5)) T'BroadcastQuasiMatrix(*, 2, T*(1:5))
170174
end
171175

172176
@testset "sum/dot/diff" begin

test/test_splines.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,7 @@ import ContinuumArrays: basis, AdjointBasisLayout, ExpansionLayout, BasisLayout,
362362
@test Δ == -(*(B',D',D,B))
363363
@test Δ == -(B'D'D*B)
364364
@test Δ == -((B'D')*(D*B))
365-
@test_broken Δ == -B'*(D'D)*B
365+
@test Δ == -B'*(D'D)*B
366366
@test Δ == -(B'*(D'D)*B)
367367

368368
f = L*exp.(L.points) # project exp(x)

0 commit comments

Comments
 (0)