2 Test formatting of types annotated with
3 [[clang::preferred_name]] attributes.
7 import lldbsuite
.test
.lldbutil
as lldbutil
8 from lldbsuite
.test
.lldbtest
import *
9 from lldbsuite
.test
.decorators
import *
12 class TestPreferredName(TestBase
):
13 @skipIf(compiler
="clang", compiler_version
=["<", "16.0"])
14 def test_frame_var(self
):
16 lldbutil
.run_to_source_breakpoint(self
, "return", lldb
.SBFileSpec("main.cpp"))
18 self
.expect("frame variable barInt", substrs
=["BarInt"])
19 self
.expect("frame variable barDouble", substrs
=["BarDouble"])
20 self
.expect("frame variable barShort", substrs
=["Bar<short>"])
21 self
.expect("frame variable barChar", substrs
=["Bar<char>"])
23 self
.expect("frame variable varInt", substrs
=["BarInt"])
24 self
.expect("frame variable varDouble", substrs
=["BarDouble"])
25 self
.expect("frame variable varShort", substrs
=["Bar<short>"])
26 self
.expect("frame variable varChar", substrs
=["Bar<char>"])
27 self
.expect("frame variable varFooInt", substrs
=["Foo<BarInt>"])
29 @skipIf(compiler
="clang", compiler_version
=["<", "16.0"])
32 lldbutil
.run_to_source_breakpoint(self
, "return", lldb
.SBFileSpec("main.cpp"))
34 self
.expect_expr("barInt", result_type
="BarInt")
35 self
.expect_expr("barDouble", result_type
="BarDouble")
36 self
.expect_expr("barShort", result_type
="Bar<short>")
37 self
.expect_expr("barChar", result_type
="Bar<char>")
39 self
.expect_expr("varInt", result_type
="BarInt")
40 self
.expect_expr("varDouble", result_type
="BarDouble")
41 self
.expect_expr("varShort", result_type
="Bar<short>")
42 self
.expect_expr("varChar", result_type
="Bar<char>")
43 self
.expect_expr("varFooInt", result_type
="Foo<BarInt>")