Skip to content

Commit 80df1f0

Browse files
[lldb][swift] Update tests to account for more accurate codegen
With [0], more accurate line numbers are generated; as such, some LLDB tests need to be updated. [0]: swiftlang/swift#77655
1 parent c763551 commit 80df1f0

File tree

3 files changed

+2
-29
lines changed

3 files changed

+2
-29
lines changed

lldb/test/API/lang/swift/async/stepping/step_over/TestSwiftAsyncStepOver.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ def test(self):
2626
expected_line_nums = [4] # print(x)
2727
expected_line_nums += [5, 6, 7, 5, 6, 7, 5] # two runs over the loop
2828
expected_line_nums += [8, 9] # if line + if block
29-
# FIXME: IRGen is producing incorrected line numbers. rdar://139826231
30-
expected_line_nums[-1] = 11
3129
for expected_line_num in expected_line_nums:
3230
thread.StepOver()
3331
stop_reason = thread.GetStopReason()

lldb/test/API/lang/swift/stepping/TestSwiftStepping.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -219,36 +219,11 @@ def do_test(self):
219219
thread.StepOut()
220220
self.hit_correct_line(thread, "Second case with a where statement")
221221

222-
thread.StepOver()
223222
thread.StepOver()
224223
self.hit_correct_line(
225224
thread, "print in second case with where statement.")
226225

227-
#
228-
# For some reason, we don't step from the body of the case to
229-
# the end of the switch, but back to the case: statement, and
230-
# then directly out of the switch.
231-
#
232226
thread.StepOver()
233-
steps_back_to_case = self.hit_correct_line(
234-
thread,
235-
"Sometimes the line table steps to here "
236-
"after the body of the case.", False)
237-
if steps_back_to_case:
238-
self.fail(
239-
"Stepping past a taken body of a case statement should not "
240-
"step back to the case statement.")
241-
242-
if self.hit_correct_line(
243-
thread,
244-
"This is the end of the switch statement", False):
245-
thread.StepOver()
246-
elif not self.hit_correct_line(
247-
thread, "Make a version of P that conforms directly", False):
248-
self.fail(
249-
"Stepping past the body of the case didn't stop "
250-
"where expected.")
251-
252227
self.hit_correct_line(
253228
thread, "Make a version of P that conforms directly")
254229

lldb/test/API/lang/swift/stepping/main.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,12 @@ func main () -> Void
191191
case (let x, let y) where
192192
return_same(x) == return_same(y): // First case with a where statement.
193193
print("(\(x), \(y)) is on the line x == y")
194-
case (let x, let y) where // Sometimes the line table steps to here after the body of the case.
194+
case (let x, let y) where
195195
return_same(x) == -return_same(y): // Second case with a where statement.
196196
print("(\(x), \(y)) is on the line x == -y") // print in second case with where statement.
197197
case (let x, let y):
198198
print("Position is: (\(x), \(y))")
199-
} // This is the end of the switch statement
199+
}
200200

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

0 commit comments

Comments
 (0)