Added a test case for reading ivars from the
authorSean Callanan <scallanan@apple.com>
Tue, 4 Nov 2014 00:06:34 +0000 (00:06 +0000)
committerSean Callanan <scallanan@apple.com>
Tue, 4 Nov 2014 00:06:34 +0000 (00:06 +0000)
Objective-C runtime.  We'll need to do more
(subclasses, partially-defined classes, etc.)
but this tests that at least the basics work.

llvm-svn: 221208

lldb/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py [new file with mode: 0644]
lldb/test/lang/objc/objc-runtime-ivars/main.m [new file with mode: 0644]

diff --git a/lldb/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py b/lldb/test/lang/objc/objc-runtime-ivars/TestRuntimeIvars.py
new file mode 100644 (file)
index 0000000..356979f
--- /dev/null
@@ -0,0 +1,4 @@
+import lldbinline
+import lldbtest
+
+lldbinline.MakeInlineTest(__file__, globals(), [lldbtest.skipIfFreeBSD,lldbtest.skipIfLinux,lldbtest.skipIfWindows])
diff --git a/lldb/test/lang/objc/objc-runtime-ivars/main.m b/lldb/test/lang/objc/objc-runtime-ivars/main.m
new file mode 100644 (file)
index 0000000..e2d77fe
--- /dev/null
@@ -0,0 +1,10 @@
+#import <Foundation/Foundation.h>
+
+int main ()
+{
+  @autoreleasepool
+  {
+    NSLog(@"Hello"); //% self.expect("expression -- *((NSConcretePointerArray*)[NSPointerArray strongObjectsPointerArray])", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["count", "capacity", "options", "mutations"]);
+                     //% self.expect("expression -- ((NSConcretePointerArray*)[NSPointerArray strongObjectsPointerArray])->count", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["unsigned long long"]);
+  }
+}