Skip to content

[lldb][swift] Update tests to account for more accurate codegen #9614

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

Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ def test(self):
expected_line_nums = [4] # print(x)
expected_line_nums += [5, 6, 7, 5, 6, 7, 5] # two runs over the loop
expected_line_nums += [8, 9] # if line + if block
# FIXME: IRGen is producing incorrected line numbers. rdar://139826231
expected_line_nums[-1] = 11
for expected_line_num in expected_line_nums:
thread.StepOver()
stop_reason = thread.GetStopReason()
Expand Down
25 changes: 0 additions & 25 deletions lldb/test/API/lang/swift/stepping/TestSwiftStepping.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,36 +219,11 @@ def do_test(self):
thread.StepOut()
self.hit_correct_line(thread, "Second case with a where statement")

thread.StepOver()
thread.StepOver()
self.hit_correct_line(
thread, "print in second case with where statement.")

#
# For some reason, we don't step from the body of the case to
# the end of the switch, but back to the case: statement, and
# then directly out of the switch.
#
thread.StepOver()
steps_back_to_case = self.hit_correct_line(
thread,
"Sometimes the line table steps to here "
"after the body of the case.", False)
if steps_back_to_case:
self.fail(
"Stepping past a taken body of a case statement should not "
"step back to the case statement.")

if self.hit_correct_line(
thread,
"This is the end of the switch statement", False):
thread.StepOver()
elif not self.hit_correct_line(
thread, "Make a version of P that conforms directly", False):
self.fail(
"Stepping past the body of the case didn't stop "
"where expected.")

self.hit_correct_line(
thread, "Make a version of P that conforms directly")

Expand Down
4 changes: 2 additions & 2 deletions lldb/test/API/lang/swift/stepping/main.swift
Original file line number Diff line number Diff line change
Expand Up @@ -191,12 +191,12 @@ func main () -> Void
case (let x, let y) where
return_same(x) == return_same(y): // First case with a where statement.
print("(\(x), \(y)) is on the line x == y")
case (let x, let y) where // Sometimes the line table steps to here after the body of the case.
case (let x, let y) where
return_same(x) == -return_same(y): // Second case with a where statement.
print("(\(x), \(y)) is on the line x == -y") // print in second case with where statement.
case (let x, let y):
print("Position is: (\(x), \(y))")
} // This is the end of the switch statement
}

var direct : P = ConformsDirectly() // Make a version of P that conforms directly
direct.protocol_func(10)
Expand Down