Skip to content

Commit cc853d9

Browse files
committed
Add a test for the inferability of normalization
1 parent a55cbb4 commit cc853d9

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/runtests.jl

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,11 @@ end
7979
@test AbstractFFTs.ifftshift([1 2 3; 4 5 6], (1,2)) == [5 6 4; 2 3 1]
8080
@test AbstractFFTs.ifftshift([1 2 3; 4 5 6], 1:2) == [5 6 4; 2 3 1]
8181
end
82+
83+
@testset "normalization" begin
84+
# normalization should be inferable even if region is only inferred as ::Any,
85+
# need to wrap in another function to test this (note that p.region::Any for
86+
# p::TestPlan)
87+
f9(p::Plan{T}, sz) where {T} = AbstractFFTs.normalization(real(T), sz, p.region)
88+
@test @inferred(f9(plan_fft(zeros(10), 1), 10)) == 1/10
89+
end

0 commit comments

Comments
 (0)