Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / lang / c / flexible-array-members / TestCFlexibleArrayMembers.py
blob89cf6c0d2b13d39a52df08c9b4f7d8edd2063f1d
1 """
2 Tests C99's flexible array members.
3 """
5 import lldb
6 from lldbsuite.test.decorators import *
7 from lldbsuite.test.lldbtest import *
8 from lldbsuite.test import lldbutil
11 class TestCase(TestBase):
12 @no_debug_info_test
13 def test(self):
14 self.build()
15 lldbutil.run_to_source_breakpoint(
16 self, "// break here", lldb.SBFileSpec("main.c")
19 self.expect_var_path("c->flexible", type="char[]", summary='"contents"')
20 # self.expect_var_path("sc->flexible", type="signed char[]", summary='"contents"')
21 self.expect_var_path(
22 "uc->flexible", type="unsigned char[]", summary='"contents"'
24 # TODO: Make this work
25 self.expect("expr c->flexible", error=True, substrs=["incomplete", "char[]"])
26 self.expect(
27 "expr sc->flexible", error=True, substrs=["incomplete", "signed char[]"]
29 self.expect(
30 "expr uc->flexible", error=True, substrs=["incomplete", "unsigned char[]"]