Skip to content

Commit d9c65c3

Browse files
committed
Fixed onedim tests
1 parent 438dd7a commit d9c65c3

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

test/onedim/real_backward.jl

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
using FFTA, Test
1+
using FFTA, Test, LinearAlgebra
22
test_nums = [8, 11, 15, 16, 27, 100]
33
@testset "backward" begin
44
for N in test_nums
55
x = ones(Float64, N)
6-
y = bfft(x)
6+
y = brfft(x, 2*(N-1))
77
y_ref = 0*y
8-
y_ref[1] = N
8+
y_ref[1] = 2*(N-1)
9+
if !isapprox(y_ref, y, atol=1e-12)
10+
println(norm(y_ref - y))
11+
end
912
@test y_ref y atol=1e-12
1013
end
1114
end

test/onedim/real_forward.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ test_nums = [8, 11, 15, 16, 27, 100]
33
@testset verbose = true " forward" begin
44
for N in test_nums
55
x = ones(Float64, N)
6-
y = fft(x)
6+
y = rfft(x)
77
y_ref = 0*y
88
y_ref[1] = N
99
@test y y_ref atol=1e-12

0 commit comments

Comments
 (0)