Skip to content

Commit

Permalink
Move 12806 test function to correct location
Browse files Browse the repository at this point in the history
  • Loading branch information
ihnorton committed Oct 17, 2015
1 parent 86c1117 commit b293d9c
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions test/core.jl
Original file line number Diff line number Diff line change
Expand Up @@ -757,25 +757,6 @@ let a = []
@test a[1] == 1
end

function test1784()
let catchb = false, catchc = false, catchr = false
for i in 1:3
try
throw("try err")
catch e
i == 1 && break
i == 2 && continue
i == 3 && return
finally
i == 1 && (catchb = true; continue)
i == 2 && (catchc = true; continue)
i == 3 && (catchr = true; return (catchb, catchc, catchr))
end
end
end
end
@test test1784() == (true,true,true)

# issue #12806
let x = 0, y = 0, z = 0
for i=1:2
Expand Down Expand Up @@ -803,6 +784,25 @@ let x = 0, y = 0, z = 0
@test z == 13
end

function test12806()
let catchb = false, catchc = false, catchr = false
for i in 1:3
try
throw("try err")
catch e
i == 1 && break
i == 2 && continue
i == 3 && return
finally
i == 1 && (catchb = true; continue)
i == 2 && (catchc = true; continue)
i == 3 && (catchr = true; return (catchb, catchc, catchr))
end
end
end
end
@test test12806() == (true,true,true)

# chained and multiple assignment behavior (issue #2913)
let
local x, a, b, c, d, e
Expand Down

0 comments on commit b293d9c

Please sign in to comment.