Skip to content

Commit 8bafeff

Browse files
authored
Tests for times operator inference (#236)
1 parent f3e6f47 commit 8bafeff

File tree

1 file changed

+6
-19
lines changed

1 file changed

+6
-19
lines changed

test/miscAFBase.jl

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -143,25 +143,6 @@ Base.:(==)(a::UniqueInterval, b::UniqueInterval) = (@assert a.parentinterval ==
143143
end
144144
end
145145

146-
@testset "inplace transform" begin
147-
@testset for sp_c in (Legendre(), Chebyshev(), Jacobi(1,2), Jacobi(0.3, 2.3),
148-
Ultraspherical(1), Ultraspherical(2))
149-
@testset for sp in (sp_c, NormalizedPolynomialSpace(sp_c))
150-
v = rand(10)
151-
v2 = copy(v)
152-
@test itransform!(sp, transform!(sp, v)) v
153-
@test transform!(sp, v) transform(sp, v2)
154-
@test itransform(sp, v) v2
155-
@test itransform!(sp, v) v2
156-
157-
# different vector
158-
p_fwd = ApproxFunBase.plan_transform!(sp, v)
159-
p_inv = ApproxFunBase.plan_itransform!(sp, v)
160-
@test p_inv * copy(p_fwd * copy(v)) v
161-
end
162-
end
163-
end
164-
165146
@testset "conversion" begin
166147
C12 = Conversion(Chebyshev(), NormalizedLegendre())
167148
C21 = Conversion(NormalizedLegendre(), Chebyshev())
@@ -378,6 +359,12 @@ Base.:(==)(a::UniqueInterval, b::UniqueInterval) = (@assert a.parentinterval ==
378359
M = VERSION >= v"1.8" ? (@inferred f()) : f()
379360
@test all(iszero, coefficients(M * Fun()))
380361
end
362+
363+
@testset "TimesOperator" begin
364+
x = Fun()
365+
A = @inferred Derivative() * Multiplication(x, Chebyshev())
366+
@test A * x 2x
367+
end
381368
end
382369

383370
end # module

0 commit comments

Comments
 (0)