Skip to content

Commit a59f900

Browse files
authored
Merge pull request #11632 from augusto2112/test-nested-gen
[lldb] Add TestSwiftNestedGeneric test
2 parents 9cae4e2 + 00dd450 commit a59f900

File tree

3 files changed

+39
-0
lines changed

3 files changed

+39
-0
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
SWIFT_SOURCES := main.swift
2+
3+
include Makefile.rules
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
import lldb
2+
from lldbsuite.test.decorators import *
3+
import lldbsuite.test.lldbtest as lldbtest
4+
import lldbsuite.test.lldbutil as lldbutil
5+
6+
7+
class TestSwiftNestedGeneric(lldbtest.TestBase):
8+
@swiftTest
9+
def test(self):
10+
"""Test the inline array synthetic child provider and summary"""
11+
self.build()
12+
lldbutil.run_to_source_breakpoint(
13+
self, "break here", lldb.SBFileSpec("main.swift")
14+
)
15+
16+
self.runCmd("settings set symbols.swift-enable-ast-context false")
17+
self.expect(
18+
"frame variable v",
19+
substrs=[
20+
"HoldsNonNamespacedNestedStruct.NamespacedNestingStruct<Int>",
21+
"nested = 42",
22+
],
23+
)
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class HoldsNonNamespacedNestedStruct {
2+
struct NamespacedNestingStruct<T> {
3+
let nested: T
4+
}
5+
6+
}
7+
8+
func f() {
9+
let v = HoldsNonNamespacedNestedStruct.NamespacedNestingStruct<Int>(nested: 42)
10+
print(v) // break here
11+
}
12+
13+
f()

0 commit comments

Comments
 (0)