3 Test lldb data formatter subsystem.
8 from lldbsuite.test.decorators import *
9 from lldbsuite.test.lldbtest import *
10 from lldbsuite.test import lldbutil
12 from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
15 class ObjCDataFormatterNSContainer(ObjCDataFormatterTestCase):
18 def test_nscontainers_with_run_command(self):
19 """Test formatters for NS container classes."""
20 self.appkit_tester_impl(self.nscontainers_data_formatter_commands)
22 def nscontainers_data_formatter_commands(self):
24 'frame variable newArray nsDictionary newDictionary nscfDictionary cfDictionaryRef newMutableDictionary cfarray_ref mutable_array_ref',
26 '(NSArray *) newArray = ', '@"50 elements"',
27 '(NSDictionary *) newDictionary = ', ' 12 key/value pairs',
28 '(NSDictionary *) newMutableDictionary = ',
29 ' 21 key/value pairs', '(NSDictionary *) nsDictionary = ',
30 ' 2 key/value pairs', '(CFDictionaryRef) cfDictionaryRef = ',
31 ' 3 key/value pairs', '(CFArrayRef) cfarray_ref = ',
32 '@"3 elements"', '(CFMutableArrayRef) mutable_array_ref = ',
37 'frame variable iset1 iset2 imset',
38 substrs=['4 indexes', '512 indexes', '10 indexes'])
41 'frame variable binheap_ref',
42 substrs=['(CFBinaryHeapRef) binheap_ref = ', '@"21 items"'])
45 'expression -d run -- (NSArray*)[NSArray new]',
46 substrs=['@"0 elements"'])