2 from lldbsuite
.test
.decorators
import *
3 from lldbsuite
.test
.lldbtest
import *
4 from lldbsuite
.test
import lldbutil
7 class ExprCharTestCase(TestBase
):
8 def do_test(self
, dictionary
=None):
9 """These basic expression commands should work as expected."""
10 self
.build(dictionary
=dictionary
)
12 lldbutil
.run_to_source_breakpoint(
13 self
, "// Break here", lldb
.SBFileSpec("main.cpp")
16 self
.expect_expr("foo(c)", result_value
="1")
17 self
.expect_expr("foo(sc)", result_value
="2")
18 self
.expect_expr("foo(uc)", result_value
="3")
19 self
.expect_expr("g", result_type
="char")
20 self
.expect_expr("gs", result_type
="signed char")
21 self
.expect_expr("gu", result_type
="unsigned char")
23 def test_default_char(self
):
26 def test_signed_char(self
):
27 self
.do_test(dictionary
={"CFLAGS_EXTRAS": "-fsigned-char"})
29 def test_unsigned_char(self
):
30 self
.do_test(dictionary
={"CFLAGS_EXTRAS": "-funsigned-char"})