1# encoding: utf-8
2"""
3Test lldb data formatter subsystem.
4"""
5
6
7import lldb
8from lldbsuite.test.decorators import *
9from lldbsuite.test.lldbtest import *
10from lldbsuite.test import lldbutil
11
12from ObjCDataFormatterTestCase import ObjCDataFormatterTestCase
13
14
15class ObjCDataFormatterNSException(ObjCDataFormatterTestCase):
16
17    @skipUnlessDarwin
18    def test_nsexception_with_run_command(self):
19        """Test formatters for NSException."""
20        self.appkit_tester_impl(self.nsexception_data_formatter_commands)
21
22    def nsexception_data_formatter_commands(self):
23        self.expect(
24            'frame variable except0 except1 except2 except3',
25            substrs=[
26                '(NSException *) except0 = ',
27                '@"First"',
28                '(NSException *) except1 = ',
29                '@"Second"',
30                '(NSException *) except2 = ',
31                ' @"Third"',
32                '(NSException *) except3 = ',
33                ' @"Fourth"'
34            ])
35