Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / lldb / test / API / lang / cpp / class-template-parameter-pack / TestClassTemplateParameterPack.py
blobb6baadf7edb5e5daf143fd6342318ad9f8cbd5ab
1 import lldb
2 from lldbsuite.test.decorators import *
3 from lldbsuite.test.lldbtest import *
4 from lldbsuite.test import lldbutil
7 class TestCase(TestBase):
8 def test(self):
9 self.build()
10 lldbutil.run_to_source_breakpoint(
11 self, "// break here", lldb.SBFileSpec("main.cpp")
14 # Test non-type template parameter packs.
15 self.expect_expr(
16 "myC",
17 result_type="C<int, 16, 32>",
18 result_children=[
19 ValueCheck(
20 name="C<int, 16>", children=[ValueCheck(name="member", value="64")]
24 self.expect_expr("myLesserC.argsAre_16_32()", result_value="false")
25 self.expect_expr("myC.argsAre_16_32()", result_value="true")
27 # Test type template parameter packs.
28 self.expect_expr(
29 "myD",
30 result_type="D<int, int, bool>",
31 result_children=[
32 ValueCheck(
33 name="D<int, int>", children=[ValueCheck(name="member", value="64")]
37 self.expect_expr("myLesserD.argsAre_Int_bool()", result_value="false")
38 self.expect_expr("myD.argsAre_Int_bool()", result_value="true")
40 # Disabling until we do template lookup correctly: http://lists.llvm.org/pipermail/lldb-commits/Week-of-Mon-20180507/040689.html
41 # FIXME: Rewrite this with expect_expr
42 # self.expect("expression -- C<int, 16>().isSixteenThirtyTwo()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["false"])
43 # self.expect("expression -- C<int, 16, 32>().isSixteenThirtyTwo()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["true"])
44 # self.expect("expression -- D<int, int>().isIntBool()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["false"])
45 # self.expect("expression -- D<int, int, bool>().isIntBool()", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["true"])