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 def test_nsexception_with_run_command(self): 18 """Test formatters for NSException.""" 19 self.appkit_tester_impl(self.nsexception_data_formatter_commands, True) 20 21 @skipUnlessDarwin 22 def test_nsexception_with_run_command_no_const(self): 23 """Test formatters for NSException.""" 24 self.appkit_tester_impl(self.nsexception_data_formatter_commands, False) 25 26 def nsexception_data_formatter_commands(self): 27 self.expect( 28 'frame variable except0 except1 except2 except3', 29 substrs=[ 30 '(NSException *) except0 = ', 31 '@"First"', 32 '(NSException *) except1 = ', 33 '@"Second"', 34 '(NSException *) except2 = ', 35 ' @"Third"', 36 '(NSException *) except3 = ', 37 ' @"Fourth"' 38 ]) 39