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    NO_DEBUG_INFO_TESTCASE = True
11
12    def test_with_run_command(self):
13        self.build()
14        lldbutil.run_to_source_breakpoint(self,"// break here", lldb.SBFileSpec("main.cpp"))
15
16        self.assertEqual(self.frame().FindVariable("myvar").GetValueAsSigned(), -1)
17        self.assertEqual(self.frame().FindVariable("myvar").GetValueAsUnsigned(), 0xFFFFFFFF)
18