brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 055a8e6 Raw
40 lines · python
1"""2Test that a nested template parameter works with simple template names.3"""4 5import lldb6import lldbsuite.test.lldbutil as lldbutil7from lldbsuite.test.decorators import *8from lldbsuite.test.lldbtest import *9 10 11class NestedTemplateTestCase(TestBase):12    def do_test(self, debug_flags):13        self.build(dictionary=debug_flags)14        self.dbg.CreateTarget(self.getBuildArtifact("a.out"))15        self.expect(16            "image lookup -A -t 'Inner<int>'",17            DATA_TYPES_DISPLAYED_CORRECTLY,18            substrs=["1 match found"],19        )20        self.expect(21            "image lookup -A -t 'NS::Struct<int>'",22            DATA_TYPES_DISPLAYED_CORRECTLY,23            substrs=["1 match found"],24        )25        self.expect(26            "image lookup -A -t 'NS::Union<int>'",27            DATA_TYPES_DISPLAYED_CORRECTLY,28            substrs=["1 match found"],29        )30 31    @skipIf(compiler=no_match("clang"))32    @skipIf(compiler_version=["<", "15.0"])33    def test_simple_template_names(self):34        self.do_test(dict(TEST_CFLAGS_EXTRAS="-gsimple-template-names"))35 36    @skipIf(compiler=no_match("clang"))37    @skipIf(compiler_version=["<", "15.0"])38    def test_no_simple_template_names(self):39        self.do_test(dict(TEST_CFLAGS_EXTRAS="-gno-simple-template-names"))40