11module TestUtils
22
33"""
4- TestUtils.test_complex_ffts(ArrayType=Array; test_inplace=true, test_adjoint=true)
4+ TestUtils.test_complex_ffts(ArrayType=Array; test_inplace=true, test_adjoint=true, test_wrappers=true )
55
66Run tests to verify correctness of FFT, BFFT, and IFFT functionality using a particular backend plan implementation.
77The backend implementation is assumed to be loaded prior to calling this function.
@@ -13,11 +13,12 @@ The backend implementation is assumed to be loaded prior to calling this functio
1313 `convert(ArrayType, ...)`.
1414- `test_inplace=true`: whether to test in-place plans.
1515- `test_adjoint=true`: whether to test [plan adjoints](api.md#Base.adjoint).
16+ - `test_wrappers=true`: whether to test any wrapper array inputs such as views.
1617"""
1718function test_complex_ffts end
1819
1920"""
20- TestUtils.test_real_ffts(ArrayType=Array; test_adjoint=true, copy_input=false)
21+ TestUtils.test_real_ffts(ArrayType=Array; test_adjoint=true, copy_input=false, test_wrappers=true )
2122
2223Run tests to verify correctness of RFFT, BRFFT, and IRFFT functionality using a particular backend plan implementation.
2324The backend implementation is assumed to be loaded prior to calling this function.
@@ -30,18 +31,21 @@ The backend implementation is assumed to be loaded prior to calling this functio
3031- `test_adjoint=true`: whether to test [plan adjoints](api.md#Base.adjoint).
3132- `copy_input=false`: whether to copy the input before applying the plan in tests, to accomodate for
3233 [input-mutating behaviour of real FFTW plans](https://github.com/JuliaMath/AbstractFFTs.jl/issues/101).
34+ - `test_wrappers=true`: whether to test any wrapper array inputs such as views.
3335"""
3436function test_real_ffts end
3537
3638 # Always copy input before application due to FFTW real plans possibly mutating input (AbstractFFTs.jl#101)
3739"""
3840 TestUtils.test_plan(P::Plan, x::AbstractArray, x_transformed::AbstractArray;
39- inplace_plan=false, copy_input=false)
41+ inplace_plan=false, copy_input=false, test_wrappers=true )
4042
4143Test basic properties of a plan `P` given an input array `x` and expected output `x_transformed`.
4244
4345Because [real FFTW plans may mutate their input in some cases](https://github.com/JuliaMath/AbstractFFTs.jl/issues/101),
4446we allow specifying `copy_input=true` to allow for this behaviour in tests by copying the input before applying the plan.
47+ We also allow specifying `test_wrappers=false` to skip testing wrapper array inputs such as views, which may cause ambiguity
48+ issues for some array types currently.
4549"""
4650function test_plan end
4751
@@ -55,6 +59,8 @@ Real-to-complex and complex-to-real plans require a slightly modified dot test,
5559The plan is assumed out-of-place, as adjoints are not yet supported for in-place plans.
5660Because [real FFTW plans may mutate their input in some cases](https://github.com/JuliaMath/AbstractFFTs.jl/issues/101),
5761we allow specifying `copy_input=true` to allow for this behaviour in tests by copying the input before applying the plan.
62+ We also allow specifying `test_wrappers=false` to skip testing wrapper array inputs such as views, which may cause ambiguity
63+ issues for some array types currently.
5864"""
5965function test_plan_adjoint end
6066
0 commit comments