Skip to content

Commit

Permalink
Test view inputs in interface tests (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
gaurav-arya authored Aug 10, 2023
1 parent 9f90dc0 commit 3bb61b6
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ext/AbstractFFTsTestExt.jl
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ function TestUtils.test_plan(P::AbstractFFTs.Plan, x::AbstractArray, x_transform
_x_out = similar(P * _copy(x))
@test mul!(_x_out, P, _copy(x)) x_transformed
@test _x_out x_transformed
@test P * view(_copy(x), axes(x)...) x_transformed # test view input
else
_x = copy(x)
@test P * _copy(_x) x_transformed
Expand All @@ -85,6 +86,7 @@ function TestUtils.test_plan_adjoint(P::AbstractFFTs.Plan, x::AbstractArray; rea
@test _component_dot(y, P * _copy(x)) _component_dot(P' * _copy(y), x)
@test _component_dot(x, P \ _copy(y)) _component_dot(P' \ _copy(x), y)
end
@test P' * view(_copy(y), axes(y)...) P' * _copy(y) # test view input (AbstractFFTs.jl#112)
@test_throws MethodError mul!(x, P', y)
end

Expand Down

0 comments on commit 3bb61b6

Please sign in to comment.