diff options
| author | 2020-08-03 14:33:06 +0000 | |
|---|---|---|
| committer | 2020-08-03 14:33:06 +0000 | |
| commit | 061da546b983eb767bad15e67af1174fb0bcf31c (patch) | |
| tree | 83c78b820819d70aa40c36d90447978b300078c5 /gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols | |
| parent | Import LLVM 10.0.0 release including clang, lld and lldb. (diff) | |
| download | wireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.tar.xz wireguard-openbsd-061da546b983eb767bad15e67af1174fb0bcf31c.zip | |
Import LLVM 10.0.0 release including clang, lld and lldb.
ok hackroom
tested by plenty
Diffstat (limited to 'gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols')
2 files changed, 40 insertions, 0 deletions
diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py new file mode 100644 index 00000000000..562d9ae01e2 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/TestIvarProtocols.py @@ -0,0 +1,7 @@ +from lldbsuite.test import lldbinline +from lldbsuite.test import decorators + +lldbinline.MakeInlineTest( + __file__, globals(), [ + decorators.skipIfFreeBSD, decorators.skipIfLinux, + decorators.skipIfWindows, decorators.skipIfNetBSD]) diff --git a/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m new file mode 100644 index 00000000000..aa6c4715c33 --- /dev/null +++ b/gnu/llvm/lldb/packages/Python/lldbsuite/test/lang/objc/objc-ivar-protocols/main.m @@ -0,0 +1,33 @@ +#import <Foundation/Foundation.h> + +@protocol MyProtocol +-(void)aMethod; +@end + +@interface MyClass : NSObject { + id <MyProtocol> myId; + NSObject <MyProtocol> *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]; + } +} |
