2 from lldbsuite.test.lldbtest import *
3 from lldbsuite.test.decorators import *
4 import lldbsuite.test.lldbutil as lldbutil
7 class TestDataFormatterCaching(TestBase):
9 mydir = TestBase.compute_mydir(__file__)
11 def test_with_run_command(self):
13 Test that hardcoded summary formatter matches aren't improperly cached.
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)')