23 lines · python
1"""2Check that SBValue.GetValueAsSigned() does the right thing for a 32-bit -1.3"""4 5import lldb6from lldbsuite.test.lldbtest import *7import lldbsuite.test.lldbutil as lldbutil8 9 10class TestCase(TestBase):11 NO_DEBUG_INFO_TESTCASE = True12 13 def test_with_run_command(self):14 self.build()15 lldbutil.run_to_source_breakpoint(16 self, "// break here", lldb.SBFileSpec("main.cpp")17 )18 19 self.assertEqual(self.frame().FindVariable("myvar").GetValueAsSigned(), -1)20 self.assertEqual(21 self.frame().FindVariable("myvar").GetValueAsUnsigned(), 0xFFFFFFFF22 )23