[mlir][acc] Introduce MappableType interface (#122146)
[llvm-project.git] / lldb / test / API / lang / objc / bitfield_ivars / TestBitfieldIvars.py
blob555fec305dbc0c20e9fc79dfc17d451e6aeea3cc
1 import lldb
2 from lldbsuite.test.decorators import *
3 from lldbsuite.test.lldbtest import *
4 from lldbsuite.test import lldbutil
7 class TestBitfieldIvars(TestBase):
8 def test(self):
9 self.build()
10 lldbutil.run_to_source_breakpoint(
11 self, "// break here", lldb.SBFileSpec("main.m")
14 self.expect_expr(
15 "chb->hb->field1", result_type="unsigned int", result_value="0"
17 ## This should happen second
18 self.expect_expr(
19 "chb->hb->field2", result_type="unsigned int", result_value="1"
22 self.expect_expr("hb2->field1", result_type="unsigned int", result_value="10")
23 self.expect_expr("hb2->field2", result_type="unsigned int", result_value="3")
24 self.expect_expr("hb2->field3", result_type="unsigned int", result_value="4")
26 self.expect(
27 "frame var *hb2",
28 substrs=["x =", "100", "field1 =", "10", "field2 =", "3", "field3 =", "4"],
31 self.expect_expr(
32 "myField",
33 result_type="UCBitFields",
34 result_children=[
35 ValueCheck(name="fieldOne", value="'\\0'"),
36 ValueCheck(name="fieldTwo", value="'\\x01'"),
37 ValueCheck(name="fieldThree", value="'\\0'"),
38 ValueCheck(name="fieldFour", value="'\\0'"),
39 ValueCheck(name="fieldFive", value="'\\x01'"),
43 # This test is meant to be xfailed, but running the test triggers an ASan
44 # issue, so it must be skipped for now.
45 @skipIf
46 def testExprWholeObject(self):
47 self.build()
48 lldbutil.run_to_source_breakpoint(
49 self, "// break here", lldb.SBFileSpec("main.m")
52 ## FIXME expression with individual bit-fields obtains correct values but not with the whole object
53 self.expect(
54 "expr *hb2",
55 substrs=["x =", "100", "field1 =", "10", "field2 =", "3", "field3 =", "4"],