Skip to content

Commit

Permalink
use lastindex in masks test
Browse files Browse the repository at this point in the history
  • Loading branch information
omlins committed Oct 30, 2024
1 parent b129021 commit 8a9f438
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion test/test_parallel.jl
Original file line number Diff line number Diff line change
Expand Up @@ -857,7 +857,7 @@ import ParallelStencil.@gorgeousexpand
end;
@testset "apply masks" begin
expansion = @prettystring(1, @parallel sum!(A, B) = (@all(A) = @all(A) + @all(B); return))
@test @prettystring(@within("@all", A)) == string(:($ix <= size(A, 1) && ($iy <= size(A, 2) && $iz <= size(A, 3))))
@test @prettystring(@within("@all", A)) == string(:($ix <= lastindex(A, 1) && ($iy <= lastindex(A, 2) && $iz <= lastindex(A, 3))))
@test occursin("if $(@prettystring(@within("@all", A)))", expansion)
end;
@reset_parallel_stencil()
Expand Down

0 comments on commit 8a9f438

Please sign in to comment.