• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import lldb
2from lldbsuite.test.lldbtest import *
3from lldbsuite.test.decorators import *
4
5class InvalidArgsExpressionTestCase(TestBase):
6
7    mydir = TestBase.compute_mydir(__file__)
8
9    @no_debug_info_test
10    def test_invalid_lang(self):
11        self.expect("expression -l foo --", error=True,
12                    substrs=["error: unknown language type: 'foo' for expression"])
13
14    @no_debug_info_test
15    def test_invalid_all_thread(self):
16        self.expect("expression -a foo --", error=True,
17                    substrs=['error: invalid all-threads value setting: "foo"'])
18
19    @no_debug_info_test
20    def test_invalid_ignore_br(self):
21        self.expect("expression -i foo --", error=True,
22                    substrs=['error: could not convert "foo" to a boolean value.'])
23
24    @no_debug_info_test
25    def test_invalid_allow_jit(self):
26        self.expect("expression -j foo --", error=True,
27                    substrs=['error: could not convert "foo" to a boolean value.'])
28
29    @no_debug_info_test
30    def test_invalid_timeout(self):
31        self.expect("expression -t foo --", error=True,
32                    substrs=['error: invalid timeout setting "foo"'])
33
34        self.expect("expression -t \"\" --", error=True,
35                    substrs=['error: invalid timeout setting ""'])
36
37    @no_debug_info_test
38    def test_invalid_unwind(self):
39        self.expect("expression -u foo --", error=True,
40                    substrs=['error: could not convert "foo" to a boolean value.'])
41
42    @no_debug_info_test
43    def test_invalid_fixits(self):
44        self.expect("expression -X foo --", error=True,
45                    substrs=['error: could not convert "foo" to a boolean value.'])
46