diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-05 22:06:53 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2019-04-05 22:06:53 +0000 |
commit | 9388c4703ba84f7a76472492e6424fa3b64e5331 (patch) | |
tree | 337999925a1483ea9e58e9531cbe230be15ae2d7 /lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py | |
parent | 1dfd74ac4a16a9b18b1c34ec427f5545e1645c13 (diff) | |
download | bcm5719-llvm-9388c4703ba84f7a76472492e6424fa3b64e5331.tar.gz bcm5719-llvm-9388c4703ba84f7a76472492e6424fa3b64e5331.zip |
[testsuite] Split Objective-C new syntax test
This splits the second longest test into separate test cases. Similar to
what we did for the Objective-C data formatters in r357786.
llvm-svn: 357824
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py')
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py new file mode 100644 index 00000000000..0cb26bb033f --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/lang/objc/objc-new-syntax/TestObjCNewSyntaxDictionary.py @@ -0,0 +1,58 @@ +"""Test that the Objective-C syntax for dictionary/array literals and indexing works""" + +from __future__ import print_function + +import lldb +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +from lldbsuite.test import lldbutil + +from ObjCNewSyntaxTest import ObjCNewSyntaxTest + + +class ObjCNewSyntaxTestCaseDictionary(ObjCNewSyntaxTest): + + @skipUnlessDarwin + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_read_dictionary(self): + self.runToBreakpoint() + + self.expect( + "expr --object-description -- immutable_dictionary[@\"key\"]", + VARIABLES_DISPLAYED_CORRECTLY, + substrs=["value"]) + + self.expect( + "expr --object-description -- mutable_dictionary[@\"key\"]", + VARIABLES_DISPLAYED_CORRECTLY, + substrs=["value"]) + + @skipUnlessDarwin + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_update_dictionary(self): + self.runToBreakpoint() + + self.expect( + "expr --object-description -- mutable_dictionary[@\"key\"] = @\"object\"", + VARIABLES_DISPLAYED_CORRECTLY, + substrs=["object"]) + + self.expect( + "expr --object-description -- mutable_dictionary[@\"key\"]", + VARIABLES_DISPLAYED_CORRECTLY, + substrs=["object"]) + + @skipUnlessDarwin + @skipIf(macos_version=["<", "10.12"]) + @expectedFailureAll(archs=["i[3-6]86"]) + def test_dictionary_literal(self): + self.runToBreakpoint() + + self.expect( + "expr --object-description -- @{ @\"key\" : @\"object\" }", + VARIABLES_DISPLAYED_CORRECTLY, + substrs=[ + "key", + "object"]) |