xref: /llvm-project/lldb/test/API/lang/objc/modules-objc-property/TestModulesObjCProperty.py (revision 2238dcc39358353cac21df75c3c3286ab20b8f53)
169e7b745SRaphael Isemannimport lldb
269e7b745SRaphael Isemannfrom lldbsuite.test.decorators import *
369e7b745SRaphael Isemannfrom lldbsuite.test.lldbtest import *
469e7b745SRaphael Isemannfrom lldbsuite.test import lldbutil
569e7b745SRaphael Isemann
669e7b745SRaphael Isemann
769e7b745SRaphael Isemannclass TestCase(TestBase):
869e7b745SRaphael Isemann    @no_debug_info_test
969e7b745SRaphael Isemann    def test_conflicting_properties(self):
1069e7b745SRaphael Isemann        """Tests receiving two properties with the same name from modules."""
1169e7b745SRaphael Isemann        self.build()
1269e7b745SRaphael Isemann        lldbutil.run_to_source_breakpoint(
13*2238dcc3SJonas Devlieghere            self, "// Set breakpoint here.", lldb.SBFileSpec("main.m")
14*2238dcc3SJonas Devlieghere        )
1569e7b745SRaphael Isemann
1669e7b745SRaphael Isemann        self.runCmd(
17*2238dcc3SJonas Devlieghere            'settings set target.clang-module-search-paths "'
18*2238dcc3SJonas Devlieghere            + self.getSourceDir()
19*2238dcc3SJonas Devlieghere            + '"'
20*2238dcc3SJonas Devlieghere        )
2169e7b745SRaphael Isemann
2269e7b745SRaphael Isemann        self.runCmd("expr @import myModule")
2369e7b745SRaphael Isemann        self.expect_expr("m.propConflict", result_value="5")
2469e7b745SRaphael Isemann        self.expect_expr("MyClass.propConflict", result_value="6")
25