From 9e6d35490a6542f9c97607f93c2ef8ca8e03cbcc Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 6 Jan 2016 20:12:03 +0000 Subject: Vendor import of lldb trunk r256945: https://llvm.org/svn/llvm-project/lldb/trunk@256945 --- .../objc/objc-ivar-protocols/TestIvarProtocols.py | 4 +++ .../test/lang/objc/objc-ivar-protocols/main.m | 33 ++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py create mode 100644 packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m (limited to 'packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols') diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py new file mode 100644 index 0000000000000..80305e303d038 --- /dev/null +++ b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py @@ -0,0 +1,4 @@ +import lldbsuite.test.lldbinline as lldbinline +import lldbsuite.test.lldbtest as lldbtest + +lldbinline.MakeInlineTest(__file__, globals(), [lldbtest.skipIfFreeBSD,lldbtest.skipIfLinux,lldbtest.skipIfWindows]) diff --git a/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m new file mode 100644 index 0000000000000..aa6c4715c33bb --- /dev/null +++ b/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m @@ -0,0 +1,33 @@ +#import + +@protocol MyProtocol +-(void)aMethod; +@end + +@interface MyClass : NSObject { + id myId; + NSObject *myObject; +}; + +-(void)doSomething; + +@end + +@implementation MyClass + +-(void)doSomething +{ + NSLog(@"Hello"); //% self.expect("expression -- myId", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["id"]); + //% self.expect("expression -- myObject", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["NSObject"]); +} + +@end + +int main () +{ + @autoreleasepool + { + MyClass *c = [MyClass alloc]; + [c doSomething]; + } +} -- cgit v1.2.3