Skip to content

Commit 2c621a1

Browse files
committed
Test false positives
1 parent 953b22e commit 2c621a1

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

lldb/test/API/functionalities/breakpoint/swift_property_accessors/TestPropertyAccessorBreakpoints.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
"""
2-
"""
3-
41
import lldb
52
from lldbsuite.test.lldbtest import *
63
from lldbsuite.test.decorators import *
@@ -19,5 +16,12 @@ def test(self):
1916
"observed.willset",
2017
"observed.didset",
2118
):
22-
bp = target.BreakpointCreateByName(name)
23-
self.assertEqual(len(bp.locations), 1, name)
19+
bp = target.BreakpointCreateByName(name, "a.out")
20+
self.assertEqual(bp.num_locations, 1, f"{name} breakpoint failed")
21+
22+
# Setting a breakpoint on the name "get" should not create a breakpoint
23+
# matching property getters. The other accerssor suffixes should also
24+
# not succeed as bare names.
25+
for name in ("get", "set", "willset", "didset"):
26+
bp = target.BreakpointCreateByName(name, "a.out")
27+
self.assertEqual(bp.num_locations, 0, f"{name} breakpoint unexpected")

0 commit comments

Comments
 (0)