1""" 2Test that we correctly handle namespace 3expression evaluation through namespace 4aliases. 5""" 6 7import lldb 8 9from lldbsuite.test.decorators import * 10from lldbsuite.test.lldbtest import * 11from lldbsuite.test import lldbutil 12 13class TestInlineNamespace(TestBase): 14 def test(self): 15 self.build() 16 17 lldbutil.run_to_source_breakpoint(self, 18 "return A::B::C::a", lldb.SBFileSpec("main.cpp")) 19 20 self.expect_expr("A::C::a", result_type="int", result_value="-1") 21 self.expect_expr("A::D::a", result_type="int", result_value="-1") 22 23 self.expect_expr("A::C::func()", result_type="int", result_value="0") 24 self.expect_expr("A::D::func()", result_type="int", result_value="0") 25 26 self.expect_expr("E::C::a", result_type="int", result_value="-1") 27 self.expect_expr("E::D::a", result_type="int", result_value="-1") 28 self.expect_expr("F::a", result_type="int", result_value="-1") 29 self.expect_expr("G::a", result_type="int", result_value="-1") 30