[clang] Fix implicit integer conversion for opaque enums declared in class templates...
[llvm-project.git] / lldb / test / API / commands / thread / select / TestThreadSelect.py
blob2a2cef4a905c9261dd47dfa36ef9c2e9069b3995
1 import lldb
2 from lldbsuite.test.lldbtest import *
3 from lldbsuite.test import lldbutil
4 from lldbsuite.test.decorators import *
7 class TestCase(TestBase):
8 def test_invalid_arg(self):
9 self.build()
11 lldbutil.run_to_source_breakpoint(
12 self, "// break here", lldb.SBFileSpec("main.cpp")
15 self.expect(
16 "thread select 0x1ffffffff",
17 error=True,
18 startstr="error: Invalid thread index '0x1ffffffff'",
20 self.expect(
21 "thread select -t 0x1ffffffff",
22 error=True,
23 startstr="error: Invalid thread ID",
25 self.expect(
26 "thread select 1 2 3",
27 error=True,
28 startstr="error: 'thread select' takes exactly one thread index argument, or a thread ID option:",
30 self.expect(
31 "thread select -t 1234 1",
32 error=True,
33 startstr="error: 'thread select' cannot take both a thread ID option and a thread index argument:",
35 # Parses but not a valid thread id.
36 self.expect(
37 "thread select 0xffffffff",
38 error=True,
39 startstr="error: Invalid thread index #0xffffffff.",
41 self.expect(
42 "thread select -t 0xffffffff",
43 error=True,
44 startstr="error: Invalid thread ID",
47 def test_thread_select_tid(self):
48 self.build()
50 lldbutil.run_to_source_breakpoint(
51 self, "// break here", lldb.SBFileSpec("main.cpp")
53 self.runCmd(
54 "thread select -t %d" % self.thread().GetThreadID(),