• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1"""
2Check that SBValue.GetValueAsSigned() does the right thing for a 32-bit -1.
3"""
4
5import lldb
6from lldbsuite.test.lldbtest import *
7import lldbsuite.test.lldbutil as lldbutil
8
9class TestCase(TestBase):
10
11    mydir = TestBase.compute_mydir(__file__)
12    NO_DEBUG_INFO_TESTCASE = True
13
14    def test_with_run_command(self):
15        self.build()
16        lldbutil.run_to_source_breakpoint(self,"// break here", lldb.SBFileSpec("main.cpp"))
17
18        self.assertEqual(self.frame().FindVariable("myvar").GetValueAsSigned(), -1)
19        self.assertEqual(self.frame().FindVariable("myvar").GetValueAsUnsigned(), 0xFFFFFFFF)
20