@@ -72,7 +72,7 @@ using Base: oneto
7272 end
7373
7474 @testset " Evaluation" begin
75-
75+
7676 @testset " 2D" begin
7777 f2 = Fun (Chebyshev ()^ 2 , [1.0 ])
7878 @test f2 (0.2 , 0.4 ) == 1.0
@@ -88,7 +88,7 @@ using Base: oneto
8888 @test f20 (rand (20 )) == 1.0
8989 end
9090 end
91-
91+
9292 @testset " Square" begin
9393 S = Space (ChebyshevInterval ()^ 2 )
9494 @test @inferred (blocklengths (S)) ≡ oneto (∞)
@@ -149,39 +149,39 @@ using Base: oneto
149149 # coefficients
150150 c_1 = rand (20 )
151151 c_2 = rand (30 )
152-
152+
153153 added_coef = [c_2[1 : 20 ]+ c_1;c_2[21 : end ]]
154-
154+
155155 # 2D
156156 f2_1 = Fun (Chebyshev ()^ 2 , c_1)
157157 f2_2 = Fun (Chebyshev ()^ 2 , c_2)
158158 @test coefficients (f2_1+ f2_2) == added_coef
159-
159+
160160 @test (f2_1+ f2_2)(0.3 , 0.5 )≈ f2_1 (0.3 , 0.5 )+ f2_2 (0.3 , 0.5 )
161-
161+
162162 # 3D
163163 f3_1 = Fun (Chebyshev ()^ 3 , c_1)
164164 f3_2 = Fun (Chebyshev ()^ 3 , c_2)
165165 @test coefficients (f3_1+ f3_2) == added_coef
166-
166+
167167 @test (f3_1+ f3_2)(0.3 , 0.5 , 0.6 )≈ f3_1 (0.3 , 0.5 , 0.6 )+ f3_2 (0.3 , 0.5 , 0.6 )
168168 end
169-
169+
170170 @testset " Multiplication" begin
171171 # coefficients
172172 c_1 = rand (20 )
173173 c_2 = rand (30 )
174-
174+
175175 # 2D
176176 f2_1 = Fun (Chebyshev ()^ 2 , c_1)
177177 f2_2 = Fun (Chebyshev ()^ 2 , c_2)
178-
178+
179179 @test (f2_1 * f2_2)(0.4 , 0.5 ) ≈ f2_1 (0.4 , 0.5 ) * f2_2 (0.4 , 0.5 )
180-
180+
181181 # 3D: not implemented in code yet
182182 # f3_1 = Fun(Chebyshev()^3, c_1)
183183 # f3_2 = Fun(Chebyshev()^3, c_2)
184-
184+
185185 # @test (f3_1*f3_2)(0.4,0.5,0.6) ≈ f3_1(0.4,0.5,0.6)*f3_2(0.4,0.5,0.6)
186186 end
187187 end
0 commit comments