@@ -238,10 +238,12 @@ end
238238            for  dims in  unique ((1 , 1 : N, N))
239239                P =  plan_fft (x, dims)
240240                @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
242243                @test_broken  dot (y, P \  x) ≈  dot (P'  \  y, x)
243244                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) 
245247                @test  dot (x, Pinv *  y) ≈  dot (Pinv'  *  x, y)
246248                @test_broken  dot (x, Pinv \  y) ≈  dot (Pinv'  \  x, y)
247249            end 
@@ -252,14 +254,16 @@ end
252254            N =  ndims (x)
253255            for  dims in  unique ((1 , 1 : N, N))
254256                P =  plan_rfft (x, dims)        
255-                 @test  (P' )'  *  x ==  P *  x
256257                y_real =  randn (size (P *  x))
257258                y_imag =  randn (size (P *  x))
258259                y =  y_real .+  y_imag .*  im 
260+                 @test  (P' )'  *  x ==  P *  x
261+                 @test  size (P' ) ==  AbstractFFTs. output_size (P) 
259262                @test  dot (y_real, real .(P *  x)) +  dot (y_imag, imag .(P *  x)) ≈  dot (P'  *  y, x)
260263                @test_broken  dot (y_real, real .(P \  x)) +  dot (y_imag, imag .(P \  x)) ≈  dot (P'  *  y, x)
261264                Pinv =  plan_irfft (y, size (x)[first (dims)], dims)
262265                @test  (Pinv' )'  *  y ==  Pinv *  y
266+                 @test  size (Pinv' ) ==  AbstractFFTs. output_size (Pinv) 
263267                @test  dot (x, Pinv *  y) ≈  dot (y_real, real .(Pinv'  *  x)) +  dot (y_imag, imag .(Pinv'  *  x))
264268                @test_broken  dot (x, Pinv \  y) ≈  dot (y_real, real .(Pinv'  \  x)) +  dot (y_imag, imag .(Pinv'  \  x))
265269            end 
0 commit comments