Skip to content

Commit

Permalink
Add a couple more tests
Browse files Browse the repository at this point in the history
  • Loading branch information
c42f committed Sep 2, 2017
1 parent b3f49d2 commit 170cad9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ end
@test (@closure (x,y,z)->x+a)(1,2,3) === 1.5
#@test_broken (@closure (x::Int,y::Int,z::Int)->x+a)(1,2,3) === 1.5
@test (@closure function blah(x,y,z); x+a; end)(1,2,3) === 1.5
@test_throws ArgumentError @eval(@closure(1+2))
# Test that when macroexpand() fails inside the @closure macro, the correct
# error is generated
@test_throws UndefVarError @eval(@closure () -> @nonexistent_macro)
Expand Down Expand Up @@ -110,10 +111,12 @@ end
end)) == [:b]
@test find_var_uses(:(
try
a = 1
a = 1+c
catch err
show(err)
end)) == []
finally
b = 1+d
end)) == [:c,:d]
end


Expand Down

0 comments on commit 170cad9

Please sign in to comment.