Skip to content

Commit 46b0845

Browse files
committed
[lldb] Update p usage in tests
1 parent 7470260 commit 46b0845

File tree

5 files changed

+15
-15
lines changed

5 files changed

+15
-15
lines changed

lldb/test/API/lang/swift/clangimporter/hard_macro_conflict/TestSwiftHardMacroConflict.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def test(self):
3535
process.Continue()
3636
threads = lldbutil.get_threads_stopped_at_breakpoint(
3737
process, b_breakpoint)
38-
self.expect("p foo", error=True)
38+
self.expect("expression foo", error=True)
3939

4040
per_module_fallback = 0
4141
import io

lldb/test/API/lang/swift/clangimporter/objcmain_conflicting_dylibs_bridging_headers/TestSwiftObjCMainConflictingDylibsBridgingHeader.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ def test(self):
3838

3939

4040
self.expect("fr var bar", "expected result", substrs=["42"])
41-
self.expect("p bar", "expected result", substrs=["$R0", "42"])
42-
self.expect("p $R0", "expected result", substrs=["$R1", "42"])
43-
self.expect("p $R1", "expected result", substrs=["$R2", "42"])
41+
self.expect("expression bar", "expected result", substrs=["$R0", "42"])
42+
self.expect("expression $R0", "expected result", substrs=["$R1", "42"])
43+
self.expect("expression $R1", "expected result", substrs=["$R2", "42"])
4444

4545
foo_breakpoint = target.BreakpointCreateBySourceRegex(
4646
'break here', lldb.SBFileSpec('Foo.swift'))
4747
process.Continue()
4848
self.expect("fr var foo", "expected result", substrs=["23"])
49-
self.expect("p foo", "expected result", substrs=["$R3", "23"])
50-
self.expect("p $R3", "expected result", substrs=["23"])
51-
self.expect("p $R4", "expected result", substrs=["23"])
49+
self.expect("expression foo", "expected result", substrs=["$R3", "23"])
50+
self.expect("expression $R3", "expected result", substrs=["23"])
51+
self.expect("expression $R4", "expected result", substrs=["23"])

lldb/test/API/lang/swift/clangimporter/rewrite_clang_paths/TestSwiftRewriteClangPaths.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,13 +82,13 @@ def dotest(self, remap):
8282

8383
if remap:
8484
comment = "returns correct value"
85-
self.expect("p foo", comment, substrs=["x", "23"])
86-
self.expect("p bar", comment, substrs=["y", "42"])
85+
self.expect("expression foo", comment, substrs=["x", "23"])
86+
self.expect("expression bar", comment, substrs=["y", "42"])
8787
self.expect("fr var foo", comment, substrs=["x", "23"])
8888
self.expect("fr var bar", comment, substrs=["y", "42"])
8989
self.assertTrue(os.path.isdir(mod_cache), "module cache exists")
9090
else:
91-
self.expect("p foo", error=True)
91+
self.expect("expression foo", error=True)
9292

9393
# Scan through the types log.
9494
errs = 0

lldb/test/API/lang/swift/parseable_interfaces/dsym/TestSwiftInterfaceDsym.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def test_sanity_negative(self):
114114
# prints the type *name*.
115115
self.assertEqual(var.GetTypeName(), "AA.MyPoint")
116116
# Evaluating an expression fails, though.
117-
self.expect("p x", error=1)
117+
self.expect("expression x", error=1)
118118

119119
@swiftTest
120120
@skipIf(archs=no_match("x86_64"))
@@ -153,7 +153,7 @@ def test_sanity_positive(self):
153153

154154
# The expression evaluator sees the whole program, so it also
155155
# sees the private members.
156-
self.expect("p x", substrs=["x = 10"])
156+
self.expect("expression x", substrs=["x = 10"])
157157
# FIXME: this doesn't work, the summary/value is null/null.
158158
#lldbutil.check_expression(
159159
# self, frame, "x", "x = 10", use_summary=False)
@@ -168,5 +168,5 @@ def test_sanity_positive(self):
168168
# MyPoint.x is private and we should still see it.
169169
child_x = var.GetChildMemberWithName("x")
170170
lldbutil.check_variable(self, child_x, value="10")
171-
self.expect("p self", substrs=["x = 10"])
171+
self.expect("expression self", substrs=["x = 10"])
172172

lldb/test/API/lang/swift/private_discriminator/TestSwiftPrivateDiscriminator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ def test(self):
2828
self.expect("e --bind-generic-types true -- self", error=True, substrs=["Hint"])
2929
# This should work because expression evaluation automatically falls back
3030
# to not binding generic parameters.
31-
self.expect("p self", substrs=['Generic', '<T>', 'n', '23'])
31+
self.expect("expression self", substrs=['Generic', '<T>', 'n', '23'])
3232

3333
process.Continue()
3434
# This should work.
3535
self.expect("frame var -d run -- visible",
3636
substrs=['Generic.Visible', 'n', '42'])
37-
self.expect("p visible", substrs=['Generic.Visible', 'n', '42'])
37+
self.expect("expression visible", substrs=['Generic.Visible', 'n', '42'])

0 commit comments

Comments
 (0)