1import lldb 2from lldbsuite.test.decorators import * 3from lldbsuite.test.lldbtest import * 4from lldbsuite.test import lldbutil 5 6class TestOrderedSet(TestBase): 7 8 def test_ordered_set(self): 9 self.build() 10 self.run_tests() 11 12 @skipUnlessDarwin 13 def test_ordered_set_no_const(self): 14 disable_constant_classes = { 15 'CC': 16 'xcrun clang', # FIXME: Remove when flags are available upstream. 17 'CFLAGS_EXTRAS': 18 '-fno-constant-nsnumber-literals ' + 19 '-fno-constant-nsarray-literals ' + 20 '-fno-constant-nsdictionary-literals' 21 } 22 self.build(dictionary=disable_constant_classes) 23 self.run_tests() 24 25 def run_tests(self): 26 src_file = "main.m" 27 src_file_spec = lldb.SBFileSpec(src_file) 28 (target, process, thread, main_breakpoint) = lldbutil.run_to_source_breakpoint(self, 29 "break here", src_file_spec, exe_name = "a.out") 30 frame = thread.GetSelectedFrame() 31 self.expect("expr -d run -- orderedSet", substrs=["3 elements"]) 32 self.expect("expr -d run -- *orderedSet", substrs=["(int)1", "(int)2", "(int)3"]) 33