brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · 82bc8d1 Raw
33 lines · python
1"""2Test that we correctly handle namespace3expression evaluation through namespace4aliases.5"""6 7import lldb8 9from lldbsuite.test.decorators import *10from lldbsuite.test.lldbtest import *11from lldbsuite.test import lldbutil12 13 14class TestInlineNamespace(TestBase):15    @skipIf(compiler="clang", compiler_version=["<", "16.0"])16    def test(self):17        self.build()18 19        lldbutil.run_to_source_breakpoint(20            self, "return A::B::C::a", lldb.SBFileSpec("main.cpp")21        )22 23        self.expect_expr("A::C::a", result_type="int", result_value="-1")24        self.expect_expr("A::D::a", result_type="int", result_value="-1")25 26        self.expect_expr("A::C::func()", result_type="int", result_value="0")27        self.expect_expr("A::D::func()", result_type="int", result_value="0")28 29        self.expect_expr("E::C::a", result_type="int", result_value="-1")30        self.expect_expr("E::D::a", result_type="int", result_value="-1")31        self.expect_expr("F::a", result_type="int", result_value="-1")32        self.expect_expr("G::a", result_type="int", result_value="-1")33