Skip to content

Add ultraspherical tests #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Feb 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions test/UltrasphericalTest.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ using Static
@inferred Conversion(Chebyshev(), Ultraspherical(static(0.5)));
@inferred (() -> Conversion(Chebyshev(), Ultraspherical(2)))();
@inferred (() -> Conversion(Chebyshev(), Ultraspherical(0.5)))();
@inferred (() -> Conversion(Chebyshev(), Ultraspherical(2.5)))();
if VERSION >= v"1.8"
@inferred (() -> Conversion(Chebyshev(), Ultraspherical(2.5)))();
end

# Conversions between Ultraspherical should lead to a small union of types
Tallowed = Union{
Expand All @@ -45,10 +47,12 @@ using Static
@inferred Tallowed Conversion(Ultraspherical(1), Ultraspherical(2));
@inferred Tallowed Conversion(Ultraspherical(1), Ultraspherical(3));

@inferred Conversion(Ultraspherical(static(1)), Ultraspherical(static(4)))
@inferred (() -> Conversion(Ultraspherical(1), Ultraspherical(4)))()
@inferred Conversion(Ultraspherical(static(1)), Ultraspherical(static(4)));
@inferred (() -> Conversion(Ultraspherical(1), Ultraspherical(4)))();
@inferred (() -> Conversion(Ultraspherical(1.0), Ultraspherical(4.0)))();
@inferred (() -> Conversion(Ultraspherical(1.0), Ultraspherical(3.5)))();
if VERSION >= v"1.8"
@inferred (() -> Conversion(Ultraspherical(1.0), Ultraspherical(3.5)))();
end

for n in (2,5)
C1 = Conversion(Chebyshev(), Ultraspherical(n))
Expand Down Expand Up @@ -164,7 +168,7 @@ using Static
sp in (_sp, NormalizedPolynomialSpace(_sp))
d = domain(sp)
f = Fun(sp, c)
for ep in (leftendpoint, rightendpoint),
@testset for ep in (leftendpoint, rightendpoint),
ev in (ApproxFunBase.ConcreteEvaluation, Evaluation)
E = @inferred ev(sp, ep, 0)
@test E[2:4] ≈ E[1:4][2:end]
Expand Down
13 changes: 9 additions & 4 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,21 @@ include("testutils.jl")

include("ClenshawTest.jl"); GC.gc()
include("ChebyshevTest.jl"); GC.gc()
# There are weird non-deterministic `ReadOnlyMemoryError`s on Windows,
# so this test is disabled for now
if !Sys.iswindows()
include("UltrasphericalTest.jl"); GC.gc()
end
include("JacobiTest.jl"); GC.gc()
include("LaguerreTest.jl"); GC.gc()
include("HermiteTest.jl"); GC.gc()
include("SpacesTest.jl"); GC.gc()
include("ComplexTest.jl"); GC.gc()
include("broadcastingtest.jl"); GC.gc()
include("OperatorTest.jl"); GC.gc()
include("ODETest.jl"); GC.gc()
include("EigTest.jl"); GC.gc()
include("VectorTest.jl"); GC.gc()
include("JacobiTest.jl"); GC.gc()
include("LaguerreTest.jl"); GC.gc()
include("HermiteTest.jl"); GC.gc()
include("SpacesTest.jl"); GC.gc()
include("MultivariateTest.jl"); GC.gc()
include("PDETest.jl"); GC.gc()

Expand Down