Skip to content

Commit

Permalink
few more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
carstenbauer committed Mar 21, 2024
1 parent 18e68d3 commit b3f3b6a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit b3f3b6a

Please sign in to comment.