@@ -51,8 +51,7 @@ const TEST_CASES = (
51
51
dims= 3 )),
52
52
)
53
53
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 )
56
55
y = rand (eltype (P * x), size (P * x))
57
56
# test basic properties
58
57
@test_broken eltype (P' ) === typeof (y) # (AbstractFFTs.jl#110)
@@ -71,20 +70,6 @@ function _adjoint_test(P, x; real_plan=false)
71
70
@test_throws MethodError mul! (x, P' , y)
72
71
end
73
72
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
- """
88
73
function TestUtils. test_complex_fft (ArrayType= Array; test_inplace= true , test_adjoint= true )
89
74
@testset " correctness of fft, bfft, ifft" begin
90
75
for test_case in TEST_CASES
@@ -111,7 +96,7 @@ function TestUtils.test_complex_fft(ArrayType=Array; test_inplace=true, test_adj
111
96
@test mul! (_x_out, P, x_complexf) ≈ x_fft
112
97
@test _x_out ≈ x_fft
113
98
if test_adjoint
114
- _adjoint_test (P, x_complexf)
99
+ TestUtils . test_plan_adjoint (P, x_complexf)
115
100
end
116
101
end
117
102
if test_inplace
@@ -145,7 +130,7 @@ function TestUtils.test_complex_fft(ArrayType=Array; test_inplace=true, test_adj
145
130
@test mul! (_x_complexf, P, x_fft) ≈ x_scaled
146
131
@test _x_complexf ≈ x_scaled
147
132
if test_adjoint
148
- _adjoint_test (P, x_complexf)
133
+ TestUtils . test_plan_adjoint (P, x_complexf)
149
134
end
150
135
end
151
136
# test IIP plans
@@ -176,7 +161,7 @@ function TestUtils.test_complex_fft(ArrayType=Array; test_inplace=true, test_adj
176
161
@test mul! (_x_complexf, P, x_fft) ≈ x
177
162
@test _x_complexf ≈ x
178
163
if test_adjoint
179
- _adjoint_test (P, x_complexf)
164
+ TestUtils . test_plan_adjoint (P, x_complexf)
180
165
end
181
166
end
182
167
# test IIP plans
@@ -195,20 +180,6 @@ function TestUtils.test_complex_fft(ArrayType=Array; test_inplace=true, test_adj
195
180
end
196
181
end
197
182
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
- """
212
183
function TestUtils. test_real_fft (ArrayType= Array; test_inplace= true , test_adjoint= true )
213
184
@testset " correctness of rfft, brfft, irfft" begin
214
185
for test_case in TEST_CASES
@@ -234,7 +205,7 @@ function TestUtils.test_real_fft(ArrayType=Array; test_inplace=true, test_adjoin
234
205
@test mul! (_x_rfft, P, copy (x_real)) ≈ x_rfft
235
206
@test _x_rfft ≈ x_rfft
236
207
if test_adjoint
237
- _adjoint_test (P, x_real; real_plan= true )
208
+ TestUtils . test_plan_adjoint (P, x_real; real_plan= true )
238
209
end
239
210
end
240
211
0 commit comments