reference, declarationdefinition
definition → references, declarations, derived classes, virtual overrides
reference to multiple definitions → definitions
unreferenced
    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
"""
Test calling an expression without a target.
"""

from __future__ import print_function


import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil


class TestCalculatorMode(TestBase):

    mydir = TestBase.compute_mydir(__file__)

    def setUp(self):
        # Call super's setUp().
        TestBase.setUp(self)

    def test__calculator_mode(self):
        """Test calling expressions in the dummy target."""
        self.expect("expression 11 + 22", "11 + 22 didn't get the expected result", substrs=["33"])
        # Now try it with a specific language:
        self.expect("expression -l c -- 11 + 22", "11 + 22 didn't get the expected result", substrs=["33"])