1*b8567559SRaphael Isemannimport lldb
2*b8567559SRaphael Isemannfrom lldbsuite.test.decorators import *
3*b8567559SRaphael Isemannfrom lldbsuite.test.lldbtest import *
4*b8567559SRaphael Isemannfrom lldbsuite.test import lldbutil
5*b8567559SRaphael Isemann
6*b8567559SRaphael Isemannclass TestCase(TestBase):
7*b8567559SRaphael Isemann
8*b8567559SRaphael Isemann    def test(self):
9*b8567559SRaphael Isemann        """
10*b8567559SRaphael Isemann        Test debugging a binary that has two templates with the same name
11*b8567559SRaphael Isemann        but different template parameters.
12*b8567559SRaphael Isemann        """
13*b8567559SRaphael Isemann        self.build()
14*b8567559SRaphael Isemann        lldbutil.run_to_source_breakpoint(self, "// break here", lldb.SBFileSpec("main.cpp"))
15*b8567559SRaphael Isemann
16*b8567559SRaphael Isemann        # Try using both templates in the same expression. This shouldn't crash.
17*b8567559SRaphael Isemann        self.expect_expr("Template1.x + Template2.x", result_type="int")
18