Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
martinholters committed Mar 6, 2024
1 parent 02ada79 commit af5889d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/dsp.jl
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ end
v_off = OffsetVector(v, -42)
@test conv(u, v; algorithm=:direct) conv(u, v; algorithm=:fft_simple) conv(u, v; algorithm=:fft_overlapsave)
@test conv(u_off, v_off; algorithm=:direct) conv(u_off, v_off; algorithm=:fft_simple) conv(u_off, v_off; algorithm=:fft_overlapsave)
@test conv(u, v) == conv(u_off, v_off)[23-42+2:23-42+N+M]
@test conv(u, v) conv(u_off, v_off)[23-42+2:23-42+N+M]

for algorithm in [:direct, :fft_simple, :fft_overlapsave]
# pre-allocated non-offset output larger than necessary
Expand All @@ -93,7 +93,7 @@ end
# pre-allocated output with offset larger than necessary
out = OffsetVector(ones(T, M+N+10), 23-42-5)
conv!(out, u_off, v_off; algorithm)
@test out[23-42+2:23-42+N+M] == conv(u, v; algorithm)
@test out[23-42+2:23-42+N+M] conv(u, v; algorithm)
@test all(iszero, out[begin:23-42+1])
@test all(iszero, out[23-42+N+M+1:end])
end
Expand Down

0 comments on commit af5889d

Please sign in to comment.