From 8a9f4389750040af13539cf6dbb72aec8f1d0cd9 Mon Sep 17 00:00:00 2001 From: Samuel Omlin Date: Wed, 30 Oct 2024 19:23:54 +0100 Subject: [PATCH] use lastindex in masks test --- test/test_parallel.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/test_parallel.jl b/test/test_parallel.jl index 1d7fae99..3024033c 100644 --- a/test/test_parallel.jl +++ b/test/test_parallel.jl @@ -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()