2 from lldbsuite
.test
.decorators
import *
3 from lldbsuite
.test
.lldbtest
import *
4 from lldbsuite
.test
import lldbutil
7 class TestCase(TestBase
):
8 NO_DEBUG_INFO_TESTCASE
= True
10 def run_class_tests(self
):
11 # Expression not referencing context class.
12 self
.expect_expr("1 + 1", result_type
="int", result_value
="2")
13 # Referencing context class.
14 # FIXME: This and the expression below should return const types.
15 self
.expect_expr("member", result_type
="int", result_value
="3")
16 # Check the type of context class.
17 self
.expect_expr("this", result_type
="ContextClass *")
19 def test_member_func(self
):
21 lldbutil
.run_to_source_breakpoint(
22 self
, "// break in function in class.", lldb
.SBFileSpec("main.cpp")
24 self
.run_class_tests()
26 def test_templated_member_func(self
):
28 lldbutil
.run_to_source_breakpoint(
30 "// break in templated function in class.",
31 lldb
.SBFileSpec("main.cpp"),
33 self
.run_class_tests()
35 def run_template_class_tests(self
):
36 # Expression not referencing context class.
37 self
.expect_expr("1 + 1", result_type
="int", result_value
="2")
38 # Referencing context class.
39 # FIXME: This and the expression below should return const types.
40 self
.expect_expr("member", result_type
="int", result_value
="4")
41 # Check the type of context class.
42 self
.expect_expr("this", result_type
="TemplatedContextClass<int> *")
44 def test_template_member_func(self
):
46 lldbutil
.run_to_source_breakpoint(
48 "// break in function in templated class.",
49 lldb
.SBFileSpec("main.cpp"),
51 self
.run_template_class_tests()
53 def test_template_templated_member_func(self
):
55 lldbutil
.run_to_source_breakpoint(
57 "// break in templated function in templated class.",
58 lldb
.SBFileSpec("main.cpp"),
60 self
.run_template_class_tests()