@@ -51,8 +51,7 @@ const TEST_CASES = (
5151 dims= 3 )),
5252 )
5353
54- # Perform generic adjoint plan tests
55- function _adjoint_test (P, x; real_plan= false )
54+ function TestUtils. test_plan_adjoint (P:: AbstractFFTs.Plan , x:: AbstractArray ; real_plan= false )
5655 y = rand (eltype (P * x), size (P * x))
5756 # test basic properties
5857 @test_broken eltype (P' ) === typeof (y) # (AbstractFFTs.jl#110)
@@ -71,20 +70,6 @@ function _adjoint_test(P, x; real_plan=false)
7170 @test_throws MethodError mul! (x, P' , y)
7271end
7372
74- """
75- TestUtils.test_complex_fft(ArrayType=Array; test_real=true, test_inplace=true)
76-
77- Run tests to verify correctness of FFT/BFFT/IFFT functionality using a particular backend plan implementation.
78- The backend implementation is assumed to be loaded prior to calling this function.
79-
80- # Arguments
81-
82- - `ArrayType`: determines the `AbstractArray` implementation for
83- which the correctness tests are run. Arrays are constructed via
84- `convert(ArrayType, ...)`.
85- - `test_inplace=true`: whether to test in-place plans.
86- - `test_adjoint=true`: whether to test adjoints of plans.
87- """
8873function TestUtils. test_complex_fft (ArrayType= Array; test_inplace= true , test_adjoint= true )
8974 @testset " correctness of fft, bfft, ifft" begin
9075 for test_case in TEST_CASES
@@ -111,7 +96,7 @@ function TestUtils.test_complex_fft(ArrayType=Array; test_inplace=true, test_adj
11196 @test mul! (_x_out, P, x_complexf) ≈ x_fft
11297 @test _x_out ≈ x_fft
11398 if test_adjoint
114- _adjoint_test (P, x_complexf)
99+ TestUtils . test_plan_adjoint (P, x_complexf)
115100 end
116101 end
117102 if test_inplace
@@ -145,7 +130,7 @@ function TestUtils.test_complex_fft(ArrayType=Array; test_inplace=true, test_adj
145130 @test mul! (_x_complexf, P, x_fft) ≈ x_scaled
146131 @test _x_complexf ≈ x_scaled
147132 if test_adjoint
148- _adjoint_test (P, x_complexf)
133+ TestUtils . test_plan_adjoint (P, x_complexf)
149134 end
150135 end
151136 # test IIP plans
@@ -176,7 +161,7 @@ function TestUtils.test_complex_fft(ArrayType=Array; test_inplace=true, test_adj
176161 @test mul! (_x_complexf, P, x_fft) ≈ x
177162 @test _x_complexf ≈ x
178163 if test_adjoint
179- _adjoint_test (P, x_complexf)
164+ TestUtils . test_plan_adjoint (P, x_complexf)
180165 end
181166 end
182167 # test IIP plans
@@ -195,20 +180,6 @@ function TestUtils.test_complex_fft(ArrayType=Array; test_inplace=true, test_adj
195180 end
196181end
197182
198- """
199- TestUtils.test_real_fft(ArrayType=Array; test_real=true, test_inplace=true)
200-
201- Run tests to verify correctness of RFFT/BRFFT/IRFFT functionality using a particular backend plan implementation.
202- The backend implementation is assumed to be loaded prior to calling this function.
203-
204- # Arguments
205-
206- - `ArrayType`: determines the `AbstractArray` implementation for
207- which the correctness tests are run. Arrays are constructed via
208- `convert(ArrayType, ...)`.
209- - `test_inplace=true`: whether to test in-place plans.
210- - `test_adjoint=true`: whether to test adjoints of plans.
211- """
212183function TestUtils. test_real_fft (ArrayType= Array; test_inplace= true , test_adjoint= true )
213184 @testset " correctness of rfft, brfft, irfft" begin
214185 for test_case in TEST_CASES
@@ -234,7 +205,7 @@ function TestUtils.test_real_fft(ArrayType=Array; test_inplace=true, test_adjoin
234205 @test mul! (_x_rfft, P, copy (x_real)) ≈ x_rfft
235206 @test _x_rfft ≈ x_rfft
236207 if test_adjoint
237- _adjoint_test (P, x_real; real_plan= true )
208+ TestUtils . test_plan_adjoint (P, x_real; real_plan= true )
238209 end
239210 end
240211
0 commit comments