Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions lldb/test/API/lang/swift/debugdescriptionmacro/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
SWIFT_SOURCES := main.swift
SWIFTFLAGS_EXTRAS := -enable-experimental-feature SymbolLinkageMarkers
include Makefile.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import lldb
from lldbsuite.test.lldbtest import *
from lldbsuite.test.decorators import *
import lldbsuite.test.lldbutil as lldbutil


class TestCase(TestBase):
@swiftTest
def test(self):
"docstring"
self.build()
_, _, thread, _ = lldbutil.run_to_source_breakpoint(
self, "break here", lldb.SBFileSpec("main.swift")
)
frame = thread.frames[0]
unit = frame.FindVariable("unit")
self.assertEqual(unit.summary, '"fulfilled"')
11 changes: 11 additions & 0 deletions lldb/test/API/lang/swift/debugdescriptionmacro/main.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
@_DebugDescription
struct Unit {
var description: String { "fulfilled" }
}

func main() {
let unit = Unit()
print("break here", unit)
}

main()