summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/lang/objc
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2018-03-15 00:07:05 +0000
committerDavide Italiano <davide@freebsd.org>2018-03-15 00:07:05 +0000
commitb84d653e9b49e33f3b109d082cfa527b45c22674 (patch)
tree919a525180794cf0b5aa97db2dc87891a9ec14f1 /lldb/packages/Python/lldbsuite/test/lang/objc
parent41f33e2b181cb039df8739f602ce18e884bb7956 (diff)
downloadbcm5719-llvm-b84d653e9b49e33f3b109d082cfa527b45c22674.tar.gz
bcm5719-llvm-b84d653e9b49e33f3b109d082cfa527b45c22674.zip
[Dictionary] Rewrite the test added in r327587 as an inline test.
Until we have a better story for putting commands and check lines in the same file (they're currently ignored), it seems that inline tests are actually more concise and easier to understand. Too bad we have still some python boilerplate, but that's not really substantial so we can live with it. Thanks to Fred for pointing out and Jim for explaining me how to use the inline test format. <rdar://problem/34806516> llvm-svn: 327592
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/objc')
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/TestNSDictionary0.py6
-rw-r--r--lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/main.m7
2 files changed, 13 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/TestNSDictionary0.py b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/TestNSDictionary0.py
new file mode 100644
index 00000000000..804905106df
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/TestNSDictionary0.py
@@ -0,0 +1,6 @@
+from lldbsuite.test import lldbinline
+from lldbsuite.test import decorators
+
+lldbinline.MakeInlineTest(
+ __file__, globals(), [
+ decorators.skipIfFreeBSD, decorators.skipIfLinux, decorators.skipIfWindows])
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/main.m b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/main.m
new file mode 100644
index 00000000000..14a792b3776
--- /dev/null
+++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-foundation-dictionary-empty/main.m
@@ -0,0 +1,7 @@
+#import <Foundation/Foundation.h>
+
+int main(void)
+{
+ NSDictionary *emptyDictionary = [[NSDictionary alloc] init];
+ return 0; //% self.expect("frame var emptyDictionary", substrs = ["0 key/value pairs"]);
+}
OpenPOWER on IntegriCloud