Thiébaud Weksteen | e40e736 | 2020-10-28 15:03:00 +0100 | [diff] [blame] | 1 | import lldb |
| 2 | from lldbsuite.test.decorators import * |
| 3 | from lldbsuite.test.lldbtest import * |
| 4 | from lldbsuite.test import lldbutil |
| 5 | |
| 6 | class ExprCharTestCase(TestBase): |
| 7 | |
| 8 | mydir = TestBase.compute_mydir(__file__) |
| 9 | |
| 10 | def do_test(self, dictionary=None): |
| 11 | """These basic expression commands should work as expected.""" |
| 12 | self.build(dictionary=dictionary) |
| 13 | |
| 14 | lldbutil.run_to_source_breakpoint(self, '// Break here', lldb.SBFileSpec("main.cpp")) |
| 15 | |
| 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 | |
| 20 | def test_default_char(self): |
| 21 | self.do_test() |
| 22 | |
Chris Wailes | bcf972c | 2021-10-21 11:03:28 -0700 | [diff] [blame^] | 23 | @skipIf(oslist=["linux"], archs=["arm"], bugnumber="llvm.org/pr23069") |
Thiébaud Weksteen | e40e736 | 2020-10-28 15:03:00 +0100 | [diff] [blame] | 24 | @expectedFailureAll( |
| 25 | archs=[ |
Thiébaud Weksteen | e40e736 | 2020-10-28 15:03:00 +0100 | [diff] [blame] | 26 | "aarch64", |
| 27 | "powerpc64le", |
| 28 | "s390x"], |
| 29 | bugnumber="llvm.org/pr23069") |
| 30 | def test_signed_char(self): |
| 31 | self.do_test(dictionary={'CFLAGS_EXTRAS': '-fsigned-char'}) |
| 32 | |
| 33 | @expectedFailureAll( |
| 34 | archs=[ |
| 35 | "i[3-6]86", |
| 36 | "x86_64", |
| 37 | "arm64", |
| 38 | 'arm64e', |
| 39 | 'armv7', |
| 40 | 'armv7k', |
| 41 | 'arm64_32'], |
| 42 | bugnumber="llvm.org/pr23069, <rdar://problem/28721938>") |
| 43 | @expectedFailureAll(triple='mips*', bugnumber="llvm.org/pr23069") |
| 44 | def test_unsigned_char(self): |
| 45 | self.do_test(dictionary={'CFLAGS_EXTRAS': '-funsigned-char'}) |