1""" 2Test that unused inlined parameters are displayed. 3""" 4 5import lldb 6from lldbsuite.test.lldbtest import * 7from lldbsuite.test import lldbutil 8 9 10class TestUnusedInlinedParameters(TestBase): 11 12 def test_unused_inlined_parameters(self): 13 self.build() 14 lldbutil.run_to_source_breakpoint(self, "// break here", lldb.SBFileSpec("main.c")) 15 16 # For the unused parameters, only check the types. 17 self.assertIn("(void *) unused1 = <no location, value may have been optimized out>", 18 lldbutil.get_description(self.frame().FindVariable("unused1"))) 19 self.assertEqual(42, self.frame().FindVariable("used").GetValueAsUnsigned()) 20 self.assertIn("(int) unused2 = <no location, value may have been optimized out>", 21 lldbutil.get_description(self.frame().FindVariable("unused2"))) 22