Skip to content

[Cherry-pick into next] [lldb] Add (broken) testcase for enum projection #10391

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
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
4 changes: 4 additions & 0 deletions lldb/test/API/lang/swift/optional_clangtype/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
SWIFT_SOURCES := main.swift
SWIFT_BRIDGING_HEADER := bridging.h
SWIFT_OBJC_INTEROP := 1
include Makefile.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import lldb
from lldbsuite.test.decorators import *
import lldbsuite.test.lldbtest as lldbtest
import lldbsuite.test.lldbutil as lldbutil

class TestSwiftOptionalClangTyoe(lldbtest.TestBase):

@swiftTest
# This enum cannot be projected.
@skipIf(bugnumber='rdar://148275422')
def test(self):
self.build()
target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
self, 'break here', lldb.SBFileSpec('main.swift'))
self.expect('target variable opt')

3 changes: 3 additions & 0 deletions lldb/test/API/lang/swift/optional_clangtype/bridging.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
typedef struct {
int i;
} ClangStruct;
2 changes: 2 additions & 0 deletions lldb/test/API/lang/swift/optional_clangtype/main.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
let opt : ClangStruct? = ClangStruct(i: 23)
print("break here")