diff --git a/test/runtests.jl b/test/runtests.jl index bb3027e..0ed1504 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -238,10 +238,12 @@ end for dims in unique((1, 1:N, N)) P = plan_fft(x, dims) @test (P')' * x == P * x # test adjoint of adjoint - @test dot(y, P * x) ≈ dot(P' * y, x) + @test size(P') == AbstractFFTs.output_size(P) # test size of adjoint + @test dot(y, P * x) ≈ dot(P' * y, x) # test validity of adjoint @test_broken dot(y, P \ x) ≈ dot(P' \ y, x) Pinv = plan_ifft(y) - @test (Pinv')' * y == Pinv * y # test adjoint of adjoint + @test (Pinv')' * y == Pinv * y + @test size(Pinv') == AbstractFFTs.output_size(Pinv) @test dot(x, Pinv * y) ≈ dot(Pinv' * x, y) @test_broken dot(x, Pinv \ y) ≈ dot(Pinv' \ x, y) end @@ -252,14 +254,16 @@ end N = ndims(x) for dims in unique((1, 1:N, N)) P = plan_rfft(x, dims) - @test (P')' * x == P * x y_real = randn(size(P * x)) y_imag = randn(size(P * x)) y = y_real .+ y_imag .* im + @test (P')' * x == P * x + @test size(P') == AbstractFFTs.output_size(P) @test dot(y_real, real.(P * x)) + dot(y_imag, imag.(P * x)) ≈ dot(P' * y, x) @test_broken dot(y_real, real.(P \ x)) + dot(y_imag, imag.(P \ x)) ≈ dot(P' * y, x) Pinv = plan_irfft(y, size(x)[first(dims)], dims) @test (Pinv')' * y == Pinv * y + @test size(Pinv') == AbstractFFTs.output_size(Pinv) @test dot(x, Pinv * y) ≈ dot(y_real, real.(Pinv' * x)) + dot(y_imag, imag.(Pinv' * x)) @test_broken dot(x, Pinv \ y) ≈ dot(y_real, real.(Pinv' \ x)) + dot(y_imag, imag.(Pinv' \ x)) end