Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix metadata count test with inline coverage on #18431

Merged
merged 1 commit into from
Sep 10, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions test/parse.jl
Original file line number Diff line number Diff line change
Expand Up @@ -768,12 +768,18 @@ end
end

f1_exprs = get_expr_list(@code_typed f1(1))
@test count_meta_loc(f1_exprs) == 0
@test Meta.isexpr(f1_exprs[end], :return)

f2_exprs = get_expr_list(@code_typed f2(1))
@test count_meta_loc(f2_exprs) == 1

@test Meta.isexpr(f1_exprs[end], :return)
@test is_pop_loc(f2_exprs[end - 1])
@test Meta.isexpr(f2_exprs[end], :return)

if Base.JLOptions().code_coverage != 0 && Base.JLOptions().can_inline != 0
@test count_meta_loc(f1_exprs) == 1
@test count_meta_loc(f2_exprs) == 2
else
@test count_meta_loc(f1_exprs) == 0
@test count_meta_loc(f2_exprs) == 1
end

end