Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / lang / cpp / sizeof / TestCPPSizeof.py
blobdefe353cd0fd16a4ea59f9d9f6458ecaaf6fdf5b
1 import lldb
2 from lldbsuite.test.decorators import *
3 from lldbsuite.test.lldbtest import *
4 from lldbsuite.test import lldbutil
7 class TestCase(TestBase):
8 def test(self):
9 self.build()
10 self.createTestTarget()
12 # Empty structs/classes have size 1 in C++.
13 self.expect_expr("sizeof(Empty) == sizeof_empty", result_value="true")
14 self.expect_expr(
15 "sizeof(EmptyClass) == sizeof_empty_class", result_value="true"
17 self.expect_expr(
18 "sizeof(EmptyClassAligned) == sizeof_empty_class_aligned",
19 result_value="true",
21 self.expect_expr(
22 "sizeof(ClassEmptyMember) == sizeof_class_empty_member", result_value="true"
24 self.expect_expr("sizeof(SingleMember) == sizeof_single", result_value="true")
25 self.expect_expr(
26 "sizeof(SingleMemberClass) == sizeof_single_class", result_value="true"
28 self.expect_expr("sizeof(PaddingMember) == sizeof_padding", result_value="true")
29 self.expect_expr(
30 "sizeof(PaddingMemberClass) == sizeof_padding_class", result_value="true"