xref: /llvm-project/lldb/test/API/lang/cpp/static_methods/TestCPPStaticMethods.py (revision 4cc8f2a017c76af25234afc7c380550e9c93135c)
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    def test_with_run_command(self):
14        """Test that static methods are properly distinguished from regular methods"""
15        self.build()
16        lldbutil.run_to_source_breakpoint(self, "// Break here", lldb.SBFileSpec("main.cpp"))
17
18        self.expect_expr("A::getStaticValue()", result_type="int", result_value="5")
19        self.expect_expr("a.getMemberValue()", result_type="int", result_value="3")
20