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

[lldb] Handle new suffix casing in TestSwiftPropertyAccessorBreakpoints #8603

Open
wants to merge 1 commit into
base: swift/release/6.0
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,23 @@ def test(self):
self.build()
exe = self.getBuildArtifact("a.out")
target = self.dbg.CreateTarget(exe)
for name in (
"read_only.get",
"read_write.get",
"read_write.set",
"observed.willset",
"observed.didset",

for name, alt_name in (
("read_only.get", None),
("read_write.get", None),
("read_write.set", None),
("observed.willSet", "observed.willset"),
("observed.didSet", "observed.didset"),
):
bp = target.BreakpointCreateByName(name, "a.out")
self.assertEqual(bp.num_locations, 1, f"{name} breakpoint failed")
if not bp.IsValid() and alt_name:
bp = target.BreakpointCreateByName(alt_name, "a.out")
self.assertTrue(bp.IsValid(), f"{name} breakpoint failed")
self.assertEqual(bp.num_locations, 1)

# Setting a breakpoint on the name "get" should not create a breakpoint
# matching property getters. The other accerssor suffixes should also
# not succeed as bare names.
for name in ("get", "set", "willset", "didset"):
for name in ("get", "set", "willSet", "didSet", "willset", "didset"):
bp = target.BreakpointCreateByName(name, "a.out")
self.assertEqual(bp.num_locations, 0, f"{name} breakpoint unexpected")