Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a117008

Browse files
kshyattpull[bot]
authored andcommittedJun 9, 2022
Tests for bad arguments to at-threads (#30937)
1 parent 28b4286 commit a117008

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

‎test/threads.jl

+6
Original file line numberDiff line numberDiff line change
@@ -304,3 +304,9 @@ close(proc.in)
304304
end
305305
end
306306
end
307+
308+
@testset "bad arguments to @threads" begin
309+
@test_throws ArgumentError @macroexpand(@threads 1 2) # wrong number of args
310+
@test_throws ArgumentError @macroexpand(@threads 1) # arg isn't an Expr
311+
@test_throws ArgumentError @macroexpand(@threads if true 1 end) # arg doesn't start with for
312+
end

0 commit comments

Comments
 (0)
Please sign in to comment.