Skip to content

Commit 3da45ac

Browse files
committed
Use TestUtils for DCT adjoint tests
1 parent 2d2e732 commit 3da45ac

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

test/runtests.jl

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -578,28 +578,19 @@ end
578578
end
579579
end
580580

581-
@testset "adjoint" begin
581+
@testset "DCT adjoints" begin
582582
for x in (randn(3), randn(4), randn(3, 4), randn(3, 4, 5))
583583
y = randn(size(x))
584584
N = ndims(x)
585585
for dims in unique((1, 1:N, N))
586-
587-
# DCT/ IDCT
588586
for P in (plan_dct(x, dims), plan_idct(x, dims))
589-
@test (P')' * x == P * x
590-
@test size(P') == AbstractFFTs.output_size(P)
591-
@test dot(y, P * x) dot(P' * y, x)
592-
@test dot(y, P \ x) dot(P' \ y, x)
593-
end # P
594-
end # dims
595-
end # x
587+
AbstractFFTs.TestUtils.test_plan_adjoint(P, x)
588+
end
589+
end
590+
end
596591
end
597592

598593
@testset "AbstractFFTs FFT backend tests" begin
599594
AbstractFFTs.TestUtils.test_complex_ffts(Array)
600595
AbstractFFTs.TestUtils.test_real_ffts(Array; copy_input=true)
601596
end
602-
603-
@testset "ChainRules" begin
604-
605-
end

0 commit comments

Comments
 (0)