xref: /llvm-project/lldb/test/API/lang/cpp/static_methods/TestCPPStaticMethods.py (revision 2238dcc39358353cac21df75c3c3286ab20b8f53)
199451b44SJordan Rupprecht"""
299451b44SJordan RupprechtTests expressions that distinguish between static and non-static methods.
399451b44SJordan Rupprecht"""
499451b44SJordan Rupprecht
599451b44SJordan Rupprechtimport lldb
699451b44SJordan Rupprechtfrom lldbsuite.test.decorators import *
799451b44SJordan Rupprechtfrom lldbsuite.test.lldbtest import *
899451b44SJordan Rupprechtfrom lldbsuite.test import lldbutil
999451b44SJordan Rupprecht
1099451b44SJordan Rupprecht
1199451b44SJordan Rupprechtclass CPPStaticMethodsTestCase(TestBase):
1299451b44SJordan Rupprecht    def test_with_run_command(self):
1399451b44SJordan Rupprecht        """Test that static methods are properly distinguished from regular methods"""
1499451b44SJordan Rupprecht        self.build()
15*2238dcc3SJonas Devlieghere        lldbutil.run_to_source_breakpoint(
16*2238dcc3SJonas Devlieghere            self, "// Break here", lldb.SBFileSpec("main.cpp")
17*2238dcc3SJonas Devlieghere        )
1899451b44SJordan Rupprecht
194bee2afcSRaphael Isemann        self.expect_expr("A::getStaticValue()", result_type="int", result_value="5")
204bee2afcSRaphael Isemann        self.expect_expr("a.getMemberValue()", result_type="int", result_value="3")
21