2 Tests that importing ObjC modules in a non-ObjC target doesn't crash LLDB.
6 from lldbsuite
.test
.decorators
import *
7 from lldbsuite
.test
.lldbtest
import *
8 from lldbsuite
.test
import lldbutil
11 class TestCase(TestBase
):
14 lldbutil
.run_to_source_breakpoint(
15 self
, "// break here", lldb
.SBFileSpec("main.c")
18 # Import foundation to get some ObjC types.
19 self
.expect("expr --lang objc -- @import Foundation")
20 # Do something with NSString (which requires special handling when
21 # preparing to run in the target). The expression most likely can't
22 # be prepared to run in the target but it should at least not crash LLDB.
24 'expr --lang objc -- [NSString stringWithFormat:@"%d", 1];',
27 "Rewriting an Objective-C constant string requires CFStringCreateWithBytes"