Skip to content

Commit 133b0a9

Browse files
authored
Add ultraspherical tests (#195)
* limit inference tests * gc after each test file include * disable ultraspherical tests for CI * include some ultraspherical tests * Add transform and casting tests * Add evaluation and multiplication tests * disable multiplication tests * disable evaluation tests * enable multiplication, disable evaluation * Add integral tests * Test for ConcreteEvaluation * Test for Evaluation * fix tests * one set of ConcreteEvaluation tests * second set of ConcreteEvaluation tests * Add third ConcreteEvaluation tests * Add fourth ConcreteEvaluation test * All tests * disable ultraspherical tests on windows * reintroduce tests on all OS * Add downstream tests
1 parent 7d8782a commit 133b0a9

File tree

2 files changed

+18
-9
lines changed

2 files changed

+18
-9
lines changed

test/UltrasphericalTest.jl

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ using Static
3636
@inferred Conversion(Chebyshev(), Ultraspherical(static(0.5)));
3737
@inferred (() -> Conversion(Chebyshev(), Ultraspherical(2)))();
3838
@inferred (() -> Conversion(Chebyshev(), Ultraspherical(0.5)))();
39-
@inferred (() -> Conversion(Chebyshev(), Ultraspherical(2.5)))();
39+
if VERSION >= v"1.8"
40+
@inferred (() -> Conversion(Chebyshev(), Ultraspherical(2.5)))();
41+
end
4042

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

48-
@inferred Conversion(Ultraspherical(static(1)), Ultraspherical(static(4)))
49-
@inferred (() -> Conversion(Ultraspherical(1), Ultraspherical(4)))()
50+
@inferred Conversion(Ultraspherical(static(1)), Ultraspherical(static(4)));
51+
@inferred (() -> Conversion(Ultraspherical(1), Ultraspherical(4)))();
5052
@inferred (() -> Conversion(Ultraspherical(1.0), Ultraspherical(4.0)))();
51-
@inferred (() -> Conversion(Ultraspherical(1.0), Ultraspherical(3.5)))();
53+
if VERSION >= v"1.8"
54+
@inferred (() -> Conversion(Ultraspherical(1.0), Ultraspherical(3.5)))();
55+
end
5256

5357
for n in (2,5)
5458
C1 = Conversion(Chebyshev(), Ultraspherical(n))
@@ -164,7 +168,7 @@ using Static
164168
sp in (_sp, NormalizedPolynomialSpace(_sp))
165169
d = domain(sp)
166170
f = Fun(sp, c)
167-
for ep in (leftendpoint, rightendpoint),
171+
@testset for ep in (leftendpoint, rightendpoint),
168172
ev in (ApproxFunBase.ConcreteEvaluation, Evaluation)
169173
E = @inferred ev(sp, ep, 0)
170174
@test E[2:4] E[1:4][2:end]

test/runtests.jl

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,21 @@ include("testutils.jl")
1818

1919
include("ClenshawTest.jl"); GC.gc()
2020
include("ChebyshevTest.jl"); GC.gc()
21+
# There are weird non-deterministic `ReadOnlyMemoryError`s on Windows,
22+
# so this test is disabled for now
23+
if !Sys.iswindows()
24+
include("UltrasphericalTest.jl"); GC.gc()
25+
end
26+
include("JacobiTest.jl"); GC.gc()
27+
include("LaguerreTest.jl"); GC.gc()
28+
include("HermiteTest.jl"); GC.gc()
29+
include("SpacesTest.jl"); GC.gc()
2130
include("ComplexTest.jl"); GC.gc()
2231
include("broadcastingtest.jl"); GC.gc()
2332
include("OperatorTest.jl"); GC.gc()
2433
include("ODETest.jl"); GC.gc()
2534
include("EigTest.jl"); GC.gc()
2635
include("VectorTest.jl"); GC.gc()
27-
include("JacobiTest.jl"); GC.gc()
28-
include("LaguerreTest.jl"); GC.gc()
29-
include("HermiteTest.jl"); GC.gc()
30-
include("SpacesTest.jl"); GC.gc()
3136
include("MultivariateTest.jl"); GC.gc()
3237
include("PDETest.jl"); GC.gc()
3338

0 commit comments

Comments
 (0)