1""" 2Tests expressions that distinguish between static and non-static methods. 3""" 4 5import lldb 6from lldbsuite.test.decorators import * 7from lldbsuite.test.lldbtest import * 8from lldbsuite.test import lldbutil 9 10 11class CPPStaticMethodsTestCase(TestBase): 12 13 mydir = TestBase.compute_mydir(__file__) 14 15 def test_with_run_command(self): 16 """Test that static methods are properly distinguished from regular methods""" 17 self.build() 18 lldbutil.run_to_source_breakpoint(self, "// Break at this line", lldb.SBFileSpec("main.cpp")) 19 20 self.expect("expression -- A::getStaticValue()", 21 startstr="(int) $0 = 5") 22 23 self.expect("expression -- my_a.getMemberValue()", 24 startstr="(int) $1 = 3") 25