xref: /llvm-project/lldb/test/API/commands/expression/calculator_mode/TestCalculatorMode.py (revision 2238dcc39358353cac21df75c3c3286ab20b8f53)
1"""
2Test calling an expression without a target.
3"""
4
5
6import lldb
7from lldbsuite.test.decorators import *
8from lldbsuite.test.lldbtest import *
9from lldbsuite.test import lldbutil
10
11
12class TestCalculatorMode(TestBase):
13    NO_DEBUG_INFO_TESTCASE = True
14
15    def test__calculator_mode(self):
16        """Test calling expressions in the dummy target."""
17        self.expect(
18            "expression 11 + 22",
19            "11 + 22 didn't get the expected result",
20            substrs=["33"],
21        )
22        # Now try it with a specific language:
23        self.expect(
24            "expression -l c -- 11 + 22",
25            "11 + 22 didn't get the expected result",
26            substrs=["33"],
27        )
28