Skip to content

Commit e791475

Browse files
committed
[lldb] Split TestSwiftTypeAliasOtherModule in "fr v" and "expr" tests
Frame variable is actually able to resolve all of the type aliases without needing to conformances from reflection metadata. Split the test so the frame variable part can run without turning the swift-load-conformances setting on. rdar://143718920
1 parent da0f781 commit e791475

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

lldb/test/API/lang/swift/typealias_othermodule/TestSwiftTypeAliasOthermodule.py

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,26 @@ class TestSwiftTypeAliasOtherModule(TestBase):
77
NO_DEBUG_INFO_TESTCASE = True
88

99
@swiftTest
10-
def test(self):
10+
def test_frame_variable(self):
1111
"""Test that type aliases can be imported from reflection metadata"""
12-
arch = self.getArchitecture()
1312
self.build()
14-
self.expect('settings set symbols.swift-load-conformances true')
15-
log = self.getBuildArtifact("types.log")
16-
self.runCmd('log enable lldb expr types -f "%s"' % log)
1713
lldbutil.run_to_source_breakpoint(
1814
self, "break here", lldb.SBFileSpec("main.swift"), extra_images=["Dylib"]
1915
)
2016
self.expect("frame variable -- payload", substrs=["Bool", "true"])
21-
self.expect("expr -- payload", substrs=["Dylib.Impl.Payload", "true"])
2217
self.expect("continue")
2318
self.expect("frame variable -- payload", substrs=["Bool", "true"])
19+
20+
@swiftTest
21+
def test_expression(self):
22+
"""Test that type aliases can be imported into expressions from reflection metadata"""
23+
self.build()
24+
self.expect('settings set symbols.swift-load-conformances true')
25+
lldbutil.run_to_source_breakpoint(
26+
self, "break here", lldb.SBFileSpec("main.swift"), extra_images=["Dylib"]
27+
)
28+
self.expect("expr -- payload", substrs=["Dylib.Impl.Payload", "true"])
29+
self.expect("continue")
2430
self.expect(
2531
"expr -- payload", substrs=["Dylib.GenericImpl<Bool>.Payload", "true"]
2632
)

0 commit comments

Comments
 (0)