summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/packages/Python/lldbsuite')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py1
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/main.mm22
2 files changed, 23 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py b/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py
index 62f7766604c..b0f52923cc1 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/TestTypeLookup.py
@@ -52,3 +52,4 @@ class TypeLookupTestCase(TestBase):
"no type was found matching 'PleaseDontBeARealTypeThatExists'"])
self.expect('type lookup MyCPPClass', substrs=['setF', 'float getF'])
self.expect('type lookup MyClass', substrs=['setF', 'float getF'])
+ self.expect('type lookup MyObjCClass', substrs=['@interface MyObjCClass', 'int x', 'int y'])
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/main.mm b/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/main.mm
index d522e0b16d7..f62e5cb5b8c 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/main.mm
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/type_lookup/main.mm
@@ -28,6 +28,28 @@ private:
typedef MyCPPClass MyClass;
+@interface MyObjCClass : NSObject {
+ int x;
+}
+- (id)init;
+- (int)read;
+@end
+
+@implementation MyObjCClass {
+ int y;
+}
+- (id)init {
+ if (self = [super init]) {
+ self->x = 12;
+ self->y = 24;
+ }
+ return self;
+}
+- (int)read {
+ return self->x + self->y;
+}
+@end
+
int main (int argc, const char * argv[])
{
MyClass my_cpp(3.1415);
OpenPOWER on IntegriCloud