1import lldb 2from lldbsuite.test.lldbtest import * 3from lldbsuite.test.decorators import * 4 5 6class InvalidArgsExpressionTestCase(TestBase): 7 @no_debug_info_test 8 def test_invalid_lang(self): 9 self.expect( 10 "expression -l foo --", 11 error=True, 12 substrs=[ 13 "error: unknown language type: 'foo' for expression", 14 "List of supported languages:", 15 "c++", 16 "c++11", 17 "c++14", 18 ], 19 ) 20 21 @no_debug_info_test 22 def test_invalid_all_thread(self): 23 self.expect( 24 "expression -a foo --", 25 error=True, 26 substrs=['error: invalid all-threads value setting: "foo"'], 27 ) 28 29 @no_debug_info_test 30 def test_invalid_ignore_br(self): 31 self.expect( 32 "expression -i foo --", 33 error=True, 34 substrs=['error: could not convert "foo" to a boolean value.'], 35 ) 36 37 @no_debug_info_test 38 def test_invalid_allow_jit(self): 39 self.expect( 40 "expression -j foo --", 41 error=True, 42 substrs=['error: could not convert "foo" to a boolean value.'], 43 ) 44 45 @no_debug_info_test 46 def test_invalid_timeout(self): 47 self.expect( 48 "expression -t foo --", 49 error=True, 50 substrs=['error: invalid timeout setting "foo"'], 51 ) 52 53 self.expect( 54 'expression -t "" --', 55 error=True, 56 substrs=['error: invalid timeout setting ""'], 57 ) 58 59 @no_debug_info_test 60 def test_invalid_unwind(self): 61 self.expect( 62 "expression -u foo --", 63 error=True, 64 substrs=['error: could not convert "foo" to a boolean value.'], 65 ) 66 67 @no_debug_info_test 68 def test_invalid_fixits(self): 69 self.expect( 70 "expression -X foo --", 71 error=True, 72 substrs=['error: could not convert "foo" to a boolean value.'], 73 ) 74