forked from OSchip/llvm-project
[lldb] Add test for CFMutableDictionaryRef
While writing a test for a change in Foundation I noticed we didn't yet test CFMutableDictionaryRef.
This commit is contained in:
parent
e10df779f0
commit
76e3a27c16
|
@ -21,7 +21,7 @@ class ObjCDataFormatterNSContainer(ObjCDataFormatterTestCase):
|
||||||
|
|
||||||
def nscontainers_data_formatter_commands(self):
|
def nscontainers_data_formatter_commands(self):
|
||||||
self.expect(
|
self.expect(
|
||||||
'frame variable newArray nsDictionary newDictionary nscfDictionary cfDictionaryRef newMutableDictionary cfarray_ref mutable_array_ref',
|
'frame variable newArray nsDictionary newDictionary nscfDictionary cfDictionaryRef newMutableDictionary newMutableDictionaryRef cfarray_ref mutable_array_ref',
|
||||||
substrs=[
|
substrs=[
|
||||||
'(NSArray *) newArray = ',
|
'(NSArray *) newArray = ',
|
||||||
' @"50 elements"',
|
' @"50 elements"',
|
||||||
|
@ -35,6 +35,8 @@ class ObjCDataFormatterNSContainer(ObjCDataFormatterTestCase):
|
||||||
' 2 key/value pairs',
|
' 2 key/value pairs',
|
||||||
'(NSDictionary *) newMutableDictionary = ',
|
'(NSDictionary *) newMutableDictionary = ',
|
||||||
' 21 key/value pairs',
|
' 21 key/value pairs',
|
||||||
|
'(CFMutableDictionaryRef) newMutableDictionaryRef = ',
|
||||||
|
' 21 key/value pairs',
|
||||||
'(CFArrayRef) cfarray_ref = ',
|
'(CFArrayRef) cfarray_ref = ',
|
||||||
' @"3 elements"',
|
' @"3 elements"',
|
||||||
'(CFMutableArrayRef) mutable_array_ref = ',
|
'(CFMutableArrayRef) mutable_array_ref = ',
|
||||||
|
|
|
@ -476,6 +476,8 @@ int main(int argc, const char *argv[]) {
|
||||||
[newMutableDictionary setObject:@"foo" forKey:@"bar19"];
|
[newMutableDictionary setObject:@"foo" forKey:@"bar19"];
|
||||||
[newMutableDictionary setObject:@"foo" forKey:@"bar20"];
|
[newMutableDictionary setObject:@"foo" forKey:@"bar20"];
|
||||||
|
|
||||||
|
CFMutableDictionaryRef newMutableDictionaryRef = CFDictionaryCreateMutableCopy(kCFAllocatorDefault, 0, newMutableDictionary);
|
||||||
|
|
||||||
id cfKeys[4] = {@"foo", @"bar", @"baz", @"quux"};
|
id cfKeys[4] = {@"foo", @"bar", @"baz", @"quux"};
|
||||||
id cfValues[4] = {@"foo", @"bar", @"baz", @"quux"};
|
id cfValues[4] = {@"foo", @"bar", @"baz", @"quux"};
|
||||||
NSDictionary *nsDictionary = CFBridgingRelease(
|
NSDictionary *nsDictionary = CFBridgingRelease(
|
||||||
|
|
Loading…
Reference in New Issue