Skip to content

Commit

Permalink
Tests for bad arguments to at-threads (JuliaLang#30937)
Browse files Browse the repository at this point in the history
  • Loading branch information
kshyatt authored and pull[bot] committed Aug 20, 2022
1 parent e493b41 commit d67b230
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/threads.jl
Original file line number Diff line number Diff line change
Expand Up @@ -304,3 +304,9 @@ close(proc.in)
end
end
end

@testset "bad arguments to @threads" begin
@test_throws ArgumentError @macroexpand(@threads 1 2) # wrong number of args
@test_throws ArgumentError @macroexpand(@threads 1) # arg isn't an Expr
@test_throws ArgumentError @macroexpand(@threads if true 1 end) # arg doesn't start with for
end

0 comments on commit d67b230

Please sign in to comment.