diff --git a/test/test_init_parallel_stencil.jl b/test/test_init_parallel_stencil.jl index c4d51706..5fdfc91c 100644 --- a/test/test_init_parallel_stencil.jl +++ b/test/test_init_parallel_stencil.jl @@ -1,8 +1,8 @@ using Test using ParallelStencil -import ParallelStencil: @reset_parallel_stencil, @is_initialized, @get_package, @get_numbertype, @get_ndims, @get_inbounds, @get_memopt, SUPPORTED_PACKAGES, PKG_CUDA, PKG_AMDGPU, PKG_NONE, NUMBERTYPE_NONE, NDIMS_NONE +import ParallelStencil: @reset_parallel_stencil, @is_initialized, @get_package, @get_numbertype, @get_ndims, @get_inbounds, @get_padding, @get_memopt, SUPPORTED_PACKAGES, PKG_CUDA, PKG_AMDGPU, PKG_NONE, NUMBERTYPE_NONE, NDIMS_NONE import ParallelStencil: @require, @symbols -import ParallelStencil: extract_posargs_init, extract_kwargs_init, check_already_initialized, set_initialized, is_initialized, check_initialized, set_package, set_numbertype, set_ndims, set_inbounds, set_memopt +import ParallelStencil: extract_posargs_init, extract_kwargs_init, check_already_initialized, set_initialized, is_initialized, check_initialized, set_package, set_numbertype, set_ndims, set_inbounds, set_padding, set_memopt using ParallelStencil.Exceptions TEST_PACKAGES = SUPPORTED_PACKAGES @static if PKG_CUDA in TEST_PACKAGES @@ -27,6 +27,7 @@ Base.retry_load_extensions() # Potentially needed to load the extensions after t @test @get_ndims() == 3 @test @get_memopt() == false @test @get_inbounds() == false + @test @get_padding() == false end; @testset "Data" begin @test @isdefined(Data) @@ -56,9 +57,9 @@ Base.retry_load_extensions() # Potentially needed to load the extensions after t end; @reset_parallel_stencil() end; - @testset "2. initialization of ParallelStencil without numbertype and ndims, with memopt, with inbounds" begin + @testset "2. initialization of ParallelStencil without numbertype and ndims, with memopt, inbounds and padding" begin @require !@is_initialized() - @init_parallel_stencil(package = $package, inbounds = true, memopt = true) + @init_parallel_stencil(package = $package, inbounds = true, padding = true, memopt = true) @testset "initialized" begin @test @is_initialized() @test @get_package() == $package @@ -66,6 +67,7 @@ Base.retry_load_extensions() # Potentially needed to load the extensions after t @test @get_ndims() == NDIMS_NONE @test @get_memopt() == true @test @get_inbounds() == true + @test @get_padding() == true end; @testset "Data" begin @test @isdefined(Data) @@ -90,6 +92,7 @@ Base.retry_load_extensions() # Potentially needed to load the extensions after t set_ndims(@__MODULE__, 3) set_memopt(@__MODULE__, false) set_inbounds(@__MODULE__, false) + set_padding(@__MODULE__, false) @require is_initialized(@__MODULE__) @test_throws IncoherentCallError check_already_initialized(@__MODULE__, :Threads, Float64, 3, false, false) @test_throws IncoherentCallError check_already_initialized(@__MODULE__, :CUDA, Float32, 3, false, false)