1"""
2Test that variable expressions of type short are evaluated correctly.
3"""
4
5import AbstractBase
6
7from lldbsuite.test.decorators import *
8
9
10class ShortExprTestCase(AbstractBase.GenericTester):
11
12    def test_short_type(self):
13        """Test that short-type variable expressions are evaluated correctly."""
14        self.build_and_run_expr('short.cpp', ['short'])
15
16    @skipUnlessDarwin
17    def test_short_type_from_block(self):
18        """Test that short-type variables are displayed correctly from a block."""
19        self.build_and_run_expr('short.cpp', ['short'], bc=True)
20
21    def test_unsigned_short_type(self):
22        """Test that 'unsigned_short'-type variable expressions are evaluated correctly."""
23        self.build_and_run_expr('unsigned_short.cpp',
24                                ['unsigned', 'short'])
25
26    @skipUnlessDarwin
27    def test_unsigned_short_type_from_block(self):
28        """Test that 'unsigned short'-type variables are displayed correctly from a block."""
29        self.build_and_run_expr(
30            'unsigned_short.cpp', ['unsigned', 'short'], bc=True)
31