1""" 2Tests C99's flexible array members. 3""" 4 5import lldb 6from lldbsuite.test.decorators import * 7from lldbsuite.test.lldbtest import * 8from lldbsuite.test import lldbutil 9 10class TestCase(TestBase): 11 12 mydir = TestBase.compute_mydir(__file__) 13 14 @no_debug_info_test 15 def test(self): 16 self.build() 17 lldbutil.run_to_source_breakpoint(self, "// break here", 18 lldb.SBFileSpec("main.c")) 19 20 self.expect_var_path("c->flexible", type="char[]", summary='"contents"') 21 # self.expect_var_path("sc->flexible", type="signed char[]", summary='"contents"') 22 self.expect_var_path("uc->flexible", type="unsigned char[]", summary='"contents"') 23 # TODO: Make this work 24 self.expect("expr c->flexible", error=True, 25 substrs=["incomplete", "char[]"]) 26 self.expect("expr sc->flexible", error=True, 27 substrs=["incomplete", "signed char[]"]) 28 self.expect("expr uc->flexible", error=True, 29 substrs=["incomplete", "unsigned char[]"]) 30