1import lldb
2from lldbsuite.test.lldbtest import *
3from lldbsuite.test import lldbutil
4from lldbsuite.test.decorators import *
5
6class TestCase(TestBase):
7
8    def test_invalid_arg(self):
9        self.build()
10
11        lldbutil.run_to_source_breakpoint(self, '// break here', lldb.SBFileSpec("main.cpp"))
12
13        self.expect("thread select -1", error=True, startstr="error: Invalid thread index '-1'")
14        self.expect("thread select 0x1ffffffff", error=True, startstr="error: Invalid thread index '0x1ffffffff'")
15        # Parses but not a valid thread id.
16        self.expect("thread select 0xffffffff", error=True, startstr="error: invalid thread #0xffffffff.")
17