Skip to content

Commit 0f037a3

Browse files
authored
Test inference in normalized-space derivative (#171)
1 parent 864d832 commit 0f037a3

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
1919
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
2020

2121
[compat]
22-
ApproxFunBase = "0.7.55"
22+
ApproxFunBase = "0.7.56"
2323
ApproxFunBaseTest = "0.1"
2424
Aqua = "0.5"
2525
BandedMatrices = "0.16, 0.17"

test/ChebyshevTest.jl

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ using ApproxFunOrthogonalPolynomials: forwardrecurrence
253253
end
254254

255255
@testset "Normalized space" begin
256-
for f in Any[x -> 3x^3 + 5x^2 + 2, x->x, identity]
257-
for dt in Any[(), (0..1,)]
256+
for f in (x -> 3x^3 + 5x^2 + 2, x->x, identity)
257+
for dt in ((), (0..1,))
258258
S = Chebyshev(dt...)
259259
NS = NormalizedPolynomialSpace(S)
260260

@@ -273,8 +273,16 @@ using ApproxFunOrthogonalPolynomials: forwardrecurrence
273273
s1 = NormalizedChebyshev(-1..1)
274274
s2 = NormalizedChebyshev()
275275
@test s1 == s2
276-
D1 = Derivative(s1)
277-
D2 = Derivative(s2)
276+
D1 = if VERSION >= v"1.8"
277+
@inferred Derivative(s1)
278+
else
279+
Derivative(s1)
280+
end
281+
D2 = if VERSION >= v"1.8"
282+
@inferred Derivative(s2)
283+
else
284+
Derivative(s2)
285+
end
278286
f = x -> 3x^2 + 5x
279287
f1 = Fun(f, s1)
280288
f2 = Fun(f, s2)
@@ -296,7 +304,7 @@ using ApproxFunOrthogonalPolynomials: forwardrecurrence
296304
end
297305

298306
@testset "Operator exponentiation" begin
299-
for M in Any[Multiplication(Fun(), Chebyshev()), Multiplication(Fun())]
307+
for M in (Multiplication(Fun(), Chebyshev()), Multiplication(Fun()))
300308
N = @inferred (M -> M^0)(M)
301309
@test N * Fun() == Fun()
302310
N = @inferred (M -> M^1)(M)

0 commit comments

Comments
 (0)