From b3f3b6a0ae173ac252d8b1c88286fb9b552647a1 Mon Sep 17 00:00:00 2001 From: Carsten Bauer Date: Thu, 21 Mar 2024 20:15:01 +0100 Subject: [PATCH] few more tests --- test/runtests.jl | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/test/runtests.jl b/test/runtests.jl index aa65ad57..a8a40fff 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -478,6 +478,25 @@ end end; @testset "@barrier" begin + @test (@tasks for i in 1:20 + @set ntasks = 20 + @barrier + end) |> isnothing + + @test try + @macroexpand @tasks for i in 1:20 + @barrier + end + false + catch + true + end + + @test (@tasks for i in 1:20 + @set ntasks = 20 + @barrier(20) + end) |> isnothing + @test try x = Threads.Atomic{Int64}(0) y = Threads.Atomic{Int64}(0)