From a094e181a39274bf86bde505ace046e9bcf5011b Mon Sep 17 00:00:00 2001 From: Katharine Hyatt Date: Fri, 3 Nov 2023 15:43:16 -0400 Subject: [PATCH] Test for inplace Scan (#782) --- test/test_scan.jl | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/test_scan.jl b/test/test_scan.jl index 821a80cad..98fb0cbaf 100644 --- a/test/test_scan.jl +++ b/test/test_scan.jl @@ -20,6 +20,12 @@ for T in setdiff(MPITestTypes, [Char, Int8, UInt8]) B = MPI.Scan(T(rank+1), *, comm) @test B[1] == prodrank + + # in-place + C = copy(A) + C = MPI.Scan!(C, *, comm) + @test C isa ArrayType{T} + @test C == ArrayType{T}(fill(T(prodrank), 4)) end MPI.Finalize()