summaryrefslogtreecommitdiff
path: root/lldb/test/API/types/TestShortTypeExpr.py
blob: 0de2be3e589677397ebee42073a71499143bad25 (plain)
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 that variable expressions of type short are evaluated correctly.
"""

import AbstractBase

from lldbsuite.test.decorators import *


class ShortExprTestCase(AbstractBase.GenericTester):
    def test_short_type(self):
        """Test that short-type variable expressions are evaluated correctly."""
        self.build_and_run_expr("short.cpp", ["short"])

    @skipUnlessDarwin
    def test_short_type_from_block(self):
        """Test that short-type variables are displayed correctly from a block."""
        self.build_and_run_expr("short.cpp", ["short"], bc=True)

    def test_unsigned_short_type(self):
        """Test that 'unsigned_short'-type variable expressions are evaluated correctly."""
        self.build_and_run_expr("unsigned_short.cpp", ["unsigned", "short"])

    @skipUnlessDarwin
    def test_unsigned_short_type_from_block(self):
        """Test that 'unsigned short'-type variables are displayed correctly from a block."""
        self.build_and_run_expr("unsigned_short.cpp", ["unsigned", "short"], bc=True)