Skip to content

Commit

Permalink
Update ExpressionExplorer.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
Pangoraw authored Oct 22, 2023
1 parent 3ee48e6 commit 921f205
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/ExpressionExplorer.jl
Original file line number Diff line number Diff line change
Expand Up @@ -267,9 +267,14 @@ Some of these @test_broken lines are commented out to prevent printing to the te
@test testee(:(try a + 1 catch a; a end), [:a], [], [:+], [])
@test testee(:(try 1 catch e; e finally a end), [:a], [], [], [])
@test testee(:(try 1 finally a end), [:a], [], [], [])
@test testee(:(try 1 catch else x = 1; x finally a; end), [:a], [], [], [])
@test testee(:(try 1 catch else x = j; x finally a; end), [:a, :j], [], [], [])
@test testee(:(try x = 2 catch else x finally a; end), [:a, :x], [], [], [])

# try catch else was introduced in 1.8
@static if VERSION >= v"1.8.0"
@test testee(:(try 1 catch else x = 1; x finally a; end), [:a], [], [], [])
@test testee(:(try 1 catch else x = j; x finally a; end), [:a, :j], [], [], [])
@test testee(:(try x = 2 catch else x finally a; end), [:a, :x], [], [], [])
@test testee(:(try x = 2 catch else x end), [:x], [], [], [])
end
end
@testset "Comprehensions" begin
@test testee(:([sqrt(s) for s in 1:n]), [:n], [], [:sqrt, :(:)], [])
Expand Down

0 comments on commit 921f205

Please sign in to comment.