Skip to content

Commit

Permalink
update test set titles to match target syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
omlins committed Jan 4, 2024
1 parent 6ac1d0d commit 0a89f0b
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions test/test_parallel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -892,25 +892,29 @@ import ParallelStencil.@gorgeousexpand
@test occursin("f(A::Data.DeviceCellArray{T}, B::Data.DeviceCellArray{T},", expansion)
end
end;
@testset "ndims interpolation (ndims=3)" begin
@testset "N substitution (N=3)" begin
expansion = @prettystring(1, @parallel ndims=3 f(A::Data.Array{T,$(Expr(:$, :ndims))}, B::Data.Array{T,$(Expr(:$, :ndims))}, c::Integer) where T <: PSNumber = (@all(A) = @all(B)^c; return))
@test occursin("f(A::Data.Array{T, 3}, B::Data.Array{T, 3},", expansion)
end;
@testset "ndims interpolation (ndims=2)" begin
@testset "N substitution (N=2)" begin
expansion = @prettystring(1, @parallel ndims=2 f(A::Data.Array{T,$(Expr(:$, :ndims))}, B::Data.Array{T,$(Expr(:$, :ndims))}, c::Integer) where T <: PSNumber = (@all(A) = @all(B)^c; return))
@test occursin("f(A::Data.Array{T, 2}, B::Data.Array{T, 2},", expansion)
end;
@testset "ndims interpolation (ndims=1)" begin
@testset "N substitution (N=1)" begin
expansion = @prettystring(1, @parallel ndims=1 f(A::Data.Array{T,$(Expr(:$, :ndims))}, B::Data.Array{T,$(Expr(:$, :ndims))}, c::Integer) where T <: PSNumber = (@all(A) = @all(B)^c; return))
@test occursin("f(A::Data.Array{T, 1}, B::Data.Array{T, 1},", expansion)
end;
@testset "ndims tuple expansion (ndims=(1,2,3))" begin
@testset "N substitution (ndims=2, N=ndims)" begin
expansion = @prettystring(1, @parallel ndims=2 f(A::Data.Array{T,$(Expr(:$, :ndims))}, B::Data.Array{T,$(Expr(:$, :ndims))}, c::Integer) where T <: PSNumber = (@all(A) = @all(B)^c; return))
@test occursin("f(A::Data.Array{T, 2}, B::Data.Array{T, 2},", expansion)
end;
@testset "ndims tuple expansion (ndims=(1,2,3), N=ndims)" begin
expansion = @prettystring(2, @parallel ndims=(1,2,3) f(A::Data.Array{T,$(Expr(:$, :ndims))}, B::Data.Array{T,$(Expr(:$, :ndims))}, c::Integer) where T <: PSNumber = (@all(A) = @all(B)^c; return))
@test occursin("@parallel ndims = 1 function f(A::Data.Array{T, 1}, B::Data.Array{T, 1},", expansion)
@test occursin("@parallel ndims = 2 function f(A::Data.Array{T, 2}, B::Data.Array{T, 2},", expansion)
@test occursin("@parallel ndims = 3 function f(A::Data.Array{T, 3}, B::Data.Array{T, 3},", expansion)
end;
@testset "ndims tuple expansion (ndims=(1,3))" begin
@testset "ndims tuple expansion (ndims=(1,3), N=ndims.+1)" begin
expansion = @prettystring(2, @parallel ndims=(1,3) f(A::Data.Array{T,$(Expr(:$, :ndims))}, B::Data.Array{T,$(Expr(:$, :ndims))}, c::Integer) where T <: PSNumber = (@all(A) = @all(B)^c; return))
@test occursin("@parallel ndims = 1 function f(A::Data.Array{T, 1}, B::Data.Array{T, 1},", expansion)
@test occursin("@parallel ndims = 3 function f(A::Data.Array{T, 3}, B::Data.Array{T, 3},", expansion)
Expand Down

0 comments on commit 0a89f0b

Please sign in to comment.