881913b225b0fd87dafd496ce1b0855d7bc5c7cd
[openbsd] /
1 import lldb
2 from lldbsuite.test.lldbtest import *
3 from lldbsuite.test.decorators import *
4 import lldbsuite.test.lldbutil as lldbutil
5
6
7 class TestDataFormatterCaching(TestBase):
8
9     mydir = TestBase.compute_mydir(__file__)
10
11     def test_with_run_command(self):
12         """
13         Test that hardcoded summary formatter matches aren't improperly cached.
14         """
15         self.build()
16         target, process, thread, bkpt = lldbutil.run_to_source_breakpoint(
17             self, 'break here', lldb.SBFileSpec('a.c'))
18         valobj = self.frame().FindVariable('f')
19         self.assertEqual(valobj.GetValue(), '4')
20         bkpt_b = target.BreakpointCreateBySourceRegex('break here',
21                                                       lldb.SBFileSpec('b.c'))
22         lldbutil.continue_to_breakpoint(process, bkpt_b)
23         valobj = self.frame().FindVariable('f4')
24         self.assertEqual(valobj.GetSummary(), '(1, 2, 3, 4)')