Skip to content

Commit 0d67ef1

Browse files
[lldb] Remove ambiguous e commands from tests
1 parent 1cb6d32 commit 0d67ef1

File tree

9 files changed

+50
-50
lines changed

9 files changed

+50
-50
lines changed

lldb/test/API/lang/swift/archetype_in_expression/TestArchetypeInExpression.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ def test(self):
1414
# Check that you can refer to all types and function's archetypes.
1515
_, process, _, breakpoint = lldbutil.run_to_source_breakpoint(self,
1616
"break here", lldb.SBFileSpec("main.swift"))
17-
self.expect("e First.self", substrs=["Int.Type"])
18-
self.expect("e Second.self", substrs=["Double.Type"])
19-
self.expect("e Third.self", substrs=["Bool.Type"])
20-
self.expect("e T.self", substrs=["String.Type"])
21-
self.expect("e U.self", substrs=["[Int].Type"])
17+
self.expect("expr First.self", substrs=["Int.Type"])
18+
self.expect("expr Second.self", substrs=["Double.Type"])
19+
self.expect("expr Third.self", substrs=["Bool.Type"])
20+
self.expect("expr T.self", substrs=["String.Type"])
21+
self.expect("expr U.self", substrs=["[Int].Type"])
2222
# Assert that frame variable doesn't work
2323
self.expect("v First.self",
2424
substrs=["no variable or instance variable named 'First' found in this frame"],
@@ -29,20 +29,20 @@ def test(self):
2929

3030
# Check that referring to a shadowed archetype works correctly.
3131
lldbutil.continue_to_breakpoint(process, breakpoint)
32-
self.expect("e T.self", substrs=["String.Type"])
32+
self.expect("expr T.self", substrs=["String.Type"])
3333
# Assert that frame variable doesn't work
3434
self.expect("v T.self",
3535
substrs=["no variable or instance variable named 'T' found in this frame"],
3636
error=True)
3737

3838
# Check that you refer to archetypes in nested generic functions.
3939
lldbutil.continue_to_breakpoint(process, breakpoint)
40-
self.expect("e T.self", substrs=["Bool.Type"])
41-
self.expect("e U.self", substrs=["Double.Type"])
40+
self.expect("expr T.self", substrs=["Bool.Type"])
41+
self.expect("expr U.self", substrs=["Double.Type"])
4242

4343
# Check that you refer to archetypes in nested generic functions with shadowed archetypes.
4444
lldbutil.continue_to_breakpoint(process, breakpoint)
45-
self.expect("e T.self", substrs=["String.Type"])
45+
self.expect("expr T.self", substrs=["String.Type"])
4646
lldbutil.continue_to_breakpoint(process, breakpoint)
47-
self.expect("e T.self", substrs=["Int.Type"])
47+
self.expect("expr T.self", substrs=["Int.Type"])
4848

lldb/test/API/lang/swift/expression/protocol_extension_self/TestSwiftProtocolExtensionSelf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ def test(self):
1414
lldb.SBFileSpec('main.swift'))
1515
# This should work without dynamic types. For discussion, see:
1616
# https://github.com/apple/llvm-project/pull/2382
17-
self.expect("e -d no-run -- f", substrs=[' = 12345'])
17+
self.expect("expr -d no-run -- f", substrs=[' = 12345'])

lldb/test/API/lang/swift/implementation_only_imports/library_indirect/TestLibraryIndirect.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ def test_implementation_only_import_library(self):
6565
"(SomeLibrary.ContainsTwoInts) container = {\n wrapped = 0x",
6666
"\n value = (first = 2, second = 3)\n }\n other = 10\n}",
6767
"(Int) simple = 1"])
68-
self.expect("e container", substrs=["(SomeLibrary.ContainsTwoInts)", "other = 10"])
69-
self.expect("e container.wrapped", substrs=["(SomeLibrary.BoxedTwoInts)", "0x", "value = (first = 2, second = 3)"])
70-
self.expect("e container.wrapped.value", substrs=["(SomeLibraryCore.TwoInts)", "(first = 2, second = 3)"])
68+
self.expect("expr container", substrs=["(SomeLibrary.ContainsTwoInts)", "other = 10"])
69+
self.expect("expr container.wrapped", substrs=["(SomeLibrary.BoxedTwoInts)", "0x", "value = (first = 2, second = 3)"])
70+
self.expect("expr container.wrapped.value", substrs=["(SomeLibraryCore.TwoInts)", "(first = 2, second = 3)"])
7171

7272
@swiftTest
7373
def test_implementation_only_import_library_no_library_module(self):
@@ -102,6 +102,6 @@ def test_implementation_only_import_library_no_library_module(self):
102102
"wrapped = 0x",
103103
"other = 10",
104104
"(Int) simple = 1"])
105-
self.expect("e container", substrs=["(SomeLibrary.ContainsTwoInts)", "wrapped = 0x", "other = 10"])
106-
self.expect("e container.wrapped", substrs=["(SomeLibrary.BoxedTwoInts)", "value = (first = 2, second = 3)"])
107-
self.expect("e container.wrapped.value", error=True, substrs=["value of type 'BoxedTwoInts' has no member 'value'"])
105+
self.expect("expr container", substrs=["(SomeLibrary.ContainsTwoInts)", "wrapped = 0x", "other = 10"])
106+
self.expect("expr container.wrapped", substrs=["(SomeLibrary.BoxedTwoInts)", "value = (first = 2, second = 3)"])
107+
self.expect("expr container.wrapped.value", error=True, substrs=["value of type 'BoxedTwoInts' has no member 'value'"])

lldb/test/API/lang/swift/implementation_only_imports/library_resilient/TestLibraryResilient.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ def test_implementation_only_import_library(self):
5353
self.expect("fr var", substrs=[
5454
"(SomeLibrary.ContainsTwoInts) container = {\n wrapped = (first = 2, second = 3)\n other = 10\n}",
5555
"(Int) simple = 1"])
56-
self.expect("e container", substrs=["(SomeLibrary.ContainsTwoInts)", "other = 10"])
57-
self.expect("e container.wrapped", substrs=["(SomeLibraryCore.TwoInts)", "(first = 2, second = 3)"])
56+
self.expect("expr container", substrs=["(SomeLibrary.ContainsTwoInts)", "other = 10"])
57+
self.expect("expr container.wrapped", substrs=["(SomeLibraryCore.TwoInts)", "(first = 2, second = 3)"])
5858

5959
@swiftTest
6060
@expectedFailureAll(oslist=["windows"]) # Requires Remote Mirrors support
@@ -74,5 +74,5 @@ def test_implementation_only_import_library_no_library_module(self):
7474
self.expect("fr var", substrs=[
7575
"(SomeLibrary.ContainsTwoInts) container = {", "other = 10",
7676
"(Int) simple = 1"])
77-
self.expect("e container", substrs=["(SomeLibrary.ContainsTwoInts)", "other = 10"])
78-
self.expect("e container.wrapped", error=True, substrs=["value of type 'ContainsTwoInts' has no member 'wrapped'"])
77+
self.expect("expr container", substrs=["(SomeLibrary.ContainsTwoInts)", "other = 10"])
78+
self.expect("expr container.wrapped", error=True, substrs=["value of type 'ContainsTwoInts' has no member 'wrapped'"])

lldb/test/API/lang/swift/module_search_paths/TestSwiftModuleSearchPaths.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ def test_swift_module_search_paths(self):
4646
self.getBuildDir())
4747

4848
# import the module
49-
self.runCmd("e import Module")
49+
self.runCmd("expr import Module")
5050

5151
# Check that we know about the function declared in the module
5252
self.match(
53-
"e plusTen(10)", "error: Couldn't lookup symbols:", error=True)
53+
"expr plusTen(10)", "error: Couldn't lookup symbols:", error=True)
5454

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ def test(self):
2424
self.expect("frame var -d run -- self",
2525
substrs=['Builder.Private', 'n', '23'])
2626

27-
self.expect("e --bind-generic-types true -- self", error=True, substrs=["Hint"])
27+
self.expect("expr --bind-generic-types true -- self", error=True, substrs=["Hint"])
2828
# This should work because expression evaluation automatically falls back
2929
# to not binding generic parameters.
3030
self.expect("expression self", substrs=['Generic', '<T>', 'n', '23'])

lldb/test/API/lang/swift/private_generic_type/TestSwiftPrivateGenericType.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -25,54 +25,54 @@ def test_private_generic_type(self):
2525
'break here for struct', lldb.SBFileSpec('Public.swift'),
2626
extra_images=['Public'])
2727
# Make sure this fails without generic expression evaluation.
28-
self.expect("e --bind-generic-types true -- self",
28+
self.expect("expr --bind-generic-types true -- self",
2929
substrs=["Couldn't realize Swift AST type of self."],
3030
error=True)
3131
# Test that not binding works.
32-
self.expect("e --bind-generic-types false -- self",
32+
self.expect("expr --bind-generic-types false -- self",
3333
substrs=["Public.StructWrapper<T>",
3434
'name = "The invisible struct."'])
3535
# Test that the "auto" behavior also works.
36-
self.expect("e --bind-generic-types auto -- self",
36+
self.expect("expr --bind-generic-types auto -- self",
3737
substrs=["Public.StructWrapper<T>",
3838
'name = "The invisible struct."'])
3939
# Test that the default (should be the auto option) also works.
40-
self.expect("e -- self", substrs=["Public.StructWrapper<T>",
40+
self.expect("expr -- self", substrs=["Public.StructWrapper<T>",
4141
'name = "The invisible struct."'])
4242

4343
breakpoint = target.BreakpointCreateBySourceRegex(
4444
'break here for class', lldb.SBFileSpec('Public.swift'), None)
4545
lldbutil.continue_to_breakpoint(process, breakpoint)
46-
self.expect("e --bind-generic-types true -- self",
46+
self.expect("expr --bind-generic-types true -- self",
4747
substrs=["Couldn't realize Swift AST type of self."],
4848
error=True)
49-
self.expect("e --bind-generic-types false -- self",
49+
self.expect("expr --bind-generic-types false -- self",
5050
substrs=["Public.ClassWrapper<Private.InvisibleStruct>",
5151
'name = "The invisible struct."'])
52-
self.expect("e --bind-generic-types auto -- self",
52+
self.expect("expr --bind-generic-types auto -- self",
5353
substrs=["Public.ClassWrapper<Private.InvisibleStruct>",
5454
'name = "The invisible struct."'])
55-
self.expect("e -- self",
55+
self.expect("expr -- self",
5656
substrs=["Public.ClassWrapper<Private.InvisibleStruct>",
5757
'name = "The invisible struct."'])
5858

5959
breakpoint = target.BreakpointCreateBySourceRegex(
6060
'break here for two generic parameters', lldb.SBFileSpec('Public.swift'), None)
6161
lldbutil.continue_to_breakpoint(process, breakpoint)
62-
self.expect("e --bind-generic-types true -- self",
62+
self.expect("expr --bind-generic-types true -- self",
6363
substrs=["Couldn't realize Swift AST type of self."],
6464
error=True)
65-
self.expect("e --bind-generic-types false -- self",
65+
self.expect("expr --bind-generic-types false -- self",
6666
substrs=["Public.TwoGenericParameters",
6767
"<Private.InvisibleClass, Private.InvisibleStruct>",
6868
'name = "The invisible class."',
6969
"someNumber = 42"])
70-
self.expect("e --bind-generic-types auto -- self",
70+
self.expect("expr --bind-generic-types auto -- self",
7171
substrs=["Public.TwoGenericParameters",
7272
"<Private.InvisibleClass, Private.InvisibleStruct>",
7373
'name = "The invisible class."',
7474
"someNumber = 42"])
75-
self.expect("e -- self",
75+
self.expect("expr -- self",
7676
substrs=["Public.TwoGenericParameters",
7777
"<Private.InvisibleClass, Private.InvisibleStruct>",
7878
'name = "The invisible class."',
@@ -81,24 +81,24 @@ def test_private_generic_type(self):
8181
breakpoint = target.BreakpointCreateBySourceRegex(
8282
'break here for three generic parameters', lldb.SBFileSpec('Public.swift'), None)
8383
lldbutil.continue_to_breakpoint(process, breakpoint)
84-
self.expect("e --bind-generic-types true -- self",
84+
self.expect("expr --bind-generic-types true -- self",
8585
substrs=["Couldn't realize Swift AST type of self."],
8686
error=True)
87-
self.expect("e --bind-generic-types false -- self",
87+
self.expect("expr --bind-generic-types false -- self",
8888
substrs=["Public.ThreeGenericParameters",
8989
"<T, U, V>",
9090
'name = "The invisible class."',
9191
"someNumber = 42",
9292
'name = "The invisible struct."',
9393
"v = true"])
94-
self.expect("e --bind-generic-types auto -- self",
94+
self.expect("expr --bind-generic-types auto -- self",
9595
substrs=["Public.ThreeGenericParameters",
9696
"<T, U, V>",
9797
'name = "The invisible class."',
9898
"someNumber = 42",
9999
'name = "The invisible struct."',
100100
"v = true"])
101-
self.expect("e -- self",
101+
self.expect("expr -- self",
102102
substrs=["Public.ThreeGenericParameters",
103103
"<T, U, V>",
104104
'name = "The invisible class."',
@@ -109,26 +109,26 @@ def test_private_generic_type(self):
109109
breakpoint = target.BreakpointCreateBySourceRegex(
110110
'break here for four generic parameters', lldb.SBFileSpec('Public.swift'), None)
111111
lldbutil.continue_to_breakpoint(process, breakpoint)
112-
self.expect("e --bind-generic-types true -- self",
112+
self.expect("expr --bind-generic-types true -- self",
113113
substrs=["Couldn't realize Swift AST type of self."],
114114
error=True)
115-
self.expect("e --bind-generic-types false -- self",
115+
self.expect("expr --bind-generic-types false -- self",
116116
substrs=["Public.FourGenericParameters",
117117
"<T, U, V, W>",
118118
'name = "The invisible struct."',
119119
'name = "The invisible class."',
120120
"someNumber = 42",
121121
"v = 3 values", "One", "two", "three",
122122
"w = 482"])
123-
self.expect("e --bind-generic-types auto -- self",
123+
self.expect("expr --bind-generic-types auto -- self",
124124
substrs=["Public.FourGenericParameters",
125125
"<T, U, V, W>",
126126
'name = "The invisible struct."',
127127
'name = "The invisible class."',
128128
"someNumber = 42",
129129
"v = 3 values", "One", "two", "three",
130130
"w = 482"])
131-
self.expect("e -- self",
131+
self.expect("expr -- self",
132132
substrs=["Public.FourGenericParameters",
133133
"<T, U, V, W>",
134134
'name = "The invisible struct."',
@@ -140,19 +140,19 @@ def test_private_generic_type(self):
140140
breakpoint = target.BreakpointCreateBySourceRegex(
141141
'break here for non-generic', lldb.SBFileSpec('Public.swift'), None)
142142
lldbutil.continue_to_breakpoint(process, breakpoint)
143-
self.expect("e --bind-generic-types false -- self",
143+
self.expect("expr --bind-generic-types false -- self",
144144
substrs=["Could not evaluate the expression without binding generic types."],
145145
error=True)
146146

147147
breakpoint = target.BreakpointCreateBySourceRegex(
148148
'break here for nested generic parameters', lldb.SBFileSpec('Public.swift'), None)
149149
lldbutil.continue_to_breakpoint(process, breakpoint)
150-
self.expect("e --bind-generic-types false -- self",
150+
self.expect("expr --bind-generic-types false -- self",
151151
substrs=["Could not evaluate the expression without binding generic types."],
152152
error=True)
153153

154154
# Check that if both binding and not binding the generic type parameters fail, we report
155155
# the "bind generic params" error message, as that's the default case that runs first.
156-
self.expect("e --bind-generic-types auto -- self",
156+
self.expect("expr --bind-generic-types auto -- self",
157157
substrs=["Couldn't realize Swift AST type of self."],
158158
error=True)

lldb/test/API/lang/swift/protocol_default_extension_no_self_reference/TestDefaultProtocolExtensionNoSelfReference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ def test_protocol_default_extension_no_self_reference(self):
1515
self.build()
1616

1717
lldbutil.run_to_source_breakpoint(self, 'break here', lldb.SBFileSpec('main.swift'))
18-
self.expect('e -d no-run-target -- self', substrs=["(a.C) $R0 = 0x"])
18+
self.expect('expr -d no-run-target -- self', substrs=["(a.C) $R0 = 0x"])

lldb/test/API/lang/swift/regex/TestSwiftRegex.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,10 @@ def test_swift_regex_in_exp(self):
8181
self, 'Set breakpoint here', self.main_source_spec)
8282

8383
# Make sure we can use the extended syntax without enabling anything.
84-
self.expect('e -- #/Order from <(.*)>, type: (.*), count in dozen: ([0-9]+)/#',
84+
self.expect('expr -- #/Order from <(.*)>, type: (.*), count in dozen: ([0-9]+)/#',
8585
substrs=['_StringProcessing.Regex<(Substring, Substring, Substring, Substring)>'])
8686

8787
self.runCmd(
8888
"settings set target.experimental.swift-enable-bare-slash-regex true")
89-
self.expect('e -- /Order from <(.*)>, type: (.*), count in dozen: ([0-9]+)/',
89+
self.expect('expr -- /Order from <(.*)>, type: (.*), count in dozen: ([0-9]+)/',
9090
substrs=['_StringProcessing.Regex<(Substring, Substring, Substring, Substring)>'])

0 commit comments

Comments
 (0)