brintos

brintos / llvm-project-archived public Read only

0
0
Text · 718 B · 1b18cd1 Raw
21 lines · python
1import lldb2from lldbsuite.test.decorators import *3from lldbsuite.test.lldbtest import *4from lldbsuite.test import lldbutil5 6 7class TestCase(TestBase):8    def test(self):9        self.build()10        lldbutil.run_to_source_breakpoint(11            self, "// break here", lldb.SBFileSpec("main.c")12        )13 14        self.expect_expr("$__lldb_expr_result", result_type="int", result_value="11")15        self.expect_expr("$foo", result_type="int", result_value="12")16        self.expect_expr("$R0", result_type="int", result_value="13")17        self.expect(18            "expr int $foo = 123", error=True, substrs=["declaration conflicts"]19        )20        self.expect_expr("$0", result_type="int", result_value="11")21