xref: /llvm-project/lldb/test/API/lang/cpp/overloaded-functions/TestOverloadedFunctions.py (revision 2238dcc39358353cac21df75c3c3286ab20b8f53)
199451b44SJordan Rupprecht"""
299451b44SJordan RupprechtTests that functions with the same name are resolved correctly.
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 OverloadedFunctionsTestCase(TestBase):
1299451b44SJordan Rupprecht    def test_with_run_command(self):
1399451b44SJordan Rupprecht        """Test that functions with the same name are resolved correctly"""
1499451b44SJordan Rupprecht        self.build()
15*2238dcc3SJonas Devlieghere        lldbutil.run_to_source_breakpoint(
16*2238dcc3SJonas Devlieghere            self, "// breakpoint", lldb.SBFileSpec("main.cpp")
17*2238dcc3SJonas Devlieghere        )
1899451b44SJordan Rupprecht
19*2238dcc3SJonas Devlieghere        self.expect("expression -- Dump(myB)", startstr="(int) $0 = 2")
2099451b44SJordan Rupprecht
21*2238dcc3SJonas Devlieghere        self.expect("expression -- Static()", startstr="(int) $1 = 1")
22