@@ -238,10 +238,12 @@ end
238
238
for dims in unique ((1 , 1 : N, N))
239
239
P = plan_fft (x, dims)
240
240
@test (P' )' * x == P * x # test adjoint of adjoint
241
- @test dot (y, P * x) ≈ dot (P' * y, x)
241
+ @test size (P' ) == AbstractFFTs. output_size (P) # test size of adjoint
242
+ @test dot (y, P * x) ≈ dot (P' * y, x) # test validity of adjoint
242
243
@test_broken dot (y, P \ x) ≈ dot (P' \ y, x)
243
244
Pinv = plan_ifft (y)
244
- @test (Pinv' )' * y == Pinv * y # test adjoint of adjoint
245
+ @test (Pinv' )' * y == Pinv * y
246
+ @test size (Pinv' ) == AbstractFFTs. output_size (Pinv)
245
247
@test dot (x, Pinv * y) ≈ dot (Pinv' * x, y)
246
248
@test_broken dot (x, Pinv \ y) ≈ dot (Pinv' \ x, y)
247
249
end
@@ -252,14 +254,16 @@ end
252
254
N = ndims (x)
253
255
for dims in unique ((1 , 1 : N, N))
254
256
P = plan_rfft (x, dims)
255
- @test (P' )' * x == P * x
256
257
y_real = randn (size (P * x))
257
258
y_imag = randn (size (P * x))
258
259
y = y_real .+ y_imag .* im
260
+ @test (P' )' * x == P * x
261
+ @test size (P' ) == AbstractFFTs. output_size (P)
259
262
@test dot (y_real, real .(P * x)) + dot (y_imag, imag .(P * x)) ≈ dot (P' * y, x)
260
263
@test_broken dot (y_real, real .(P \ x)) + dot (y_imag, imag .(P \ x)) ≈ dot (P' * y, x)
261
264
Pinv = plan_irfft (y, size (x)[first (dims)], dims)
262
265
@test (Pinv' )' * y == Pinv * y
266
+ @test size (Pinv' ) == AbstractFFTs. output_size (Pinv)
263
267
@test dot (x, Pinv * y) ≈ dot (y_real, real .(Pinv' * x)) + dot (y_imag, imag .(Pinv' * x))
264
268
@test_broken dot (x, Pinv \ y) ≈ dot (y_real, real .(Pinv' \ x)) + dot (y_imag, imag .(Pinv' \ x))
265
269
end
0 commit comments