@@ -110,15 +110,19 @@ using StaticArrays: SVector
110
110
end
111
111
112
112
@testset " Derivative" begin
113
- D= Derivative (Jacobi (0. ,1. ,Segment (1. ,0. )))
113
+ D = if VERSION >= v " 1.8"
114
+ @inferred Derivative (Jacobi (0. ,1. ,Segment (1. ,0. )))
115
+ else
116
+ Derivative (Jacobi (0. ,1. ,Segment (1. ,0. )))
117
+ end
114
118
@time testbandedoperator (D)
115
119
# only one band should be populated
116
120
@test bandwidths (D, 1 ) == - bandwidths (D, 2 )
117
121
118
122
@testset for d in [- 1 .. 1 , 0 .. 1 ]
119
123
f = Fun (x-> x^ 2 , Chebyshev (d))
120
124
C = space (f)
121
- for J = Any[ Jacobi (- 0.5 , - 0.5 , d), Legendre (d)]
125
+ for J = ( Jacobi (- 0.5 , - 0.5 , d), Legendre (d))
122
126
g = (Derivative (J) * Conversion (C, J)) * f
123
127
h = Derivative (C) * f
124
128
@test g ≈ h
@@ -128,9 +132,9 @@ using StaticArrays: SVector
128
132
@test g ≈ h
129
133
end
130
134
end
131
- @testset for S1 in Any[ Jacobi (0 ,0 ),
132
- Jacobi ( 0 , 0 , 1 .. 2 ), Jacobi (2 ,2 ,1 .. 2 ), Jacobi (0.5 ,2.5 ,1 .. 2 )] ,
133
- S in Any[ S1, NormalizedPolynomialSpace (S1)]
135
+ @testset for S1 in ( Jacobi (0 ,0 ), Jacobi ( 0 , 0 , 1 .. 2 ),
136
+ Jacobi (2 ,2 ,1 .. 2 ), Jacobi (0.5 ,2.5 ,1 .. 2 )) ,
137
+ S in ( S1, NormalizedPolynomialSpace (S1))
134
138
f = Fun (x-> x^ 3 + 4 x^ 2 + 2 x + 6 , S)
135
139
@test Derivative (S) * f ≈ Fun (x-> 3 x^ 2 + 8 x + 2 , S)
136
140
@test Derivative (S)^ 2 * f ≈ Fun (x-> 6 x+ 8 , S)
0 commit comments