forked from OSchip/llvm-project
[lldb][NFC] Fix expect calls with wrong order of 'substrs' items for D73766
Currently the substrs parameter takes a list of strings that need to be found but the ordering isn't checked. D73766 might change that so this changes a several tests so that the order of the strings in the substrs list is in the order in which they appear in the output.
This commit is contained in:
parent
f99133e853
commit
6c7efe2eec
|
@ -86,12 +86,12 @@ class CmdPythonTestCase(TestBase):
|
|||
substrs=["Python command defined by @lldb.command"])
|
||||
|
||||
self.expect("help",
|
||||
substrs=['For more information run',
|
||||
'welcome'] + decorated_commands)
|
||||
substrs=['For more information run']
|
||||
+ decorated_commands + ['welcome'])
|
||||
|
||||
self.expect("help -a",
|
||||
substrs=['For more information run',
|
||||
'welcome'] + decorated_commands)
|
||||
substrs=['For more information run']
|
||||
+ decorated_commands + ['welcome'])
|
||||
|
||||
self.expect("help -u", matching=False,
|
||||
substrs=['For more information run'])
|
||||
|
|
|
@ -78,7 +78,7 @@ class HelpCommandTestCase(TestBase):
|
|||
def test_help_arch(self):
|
||||
"""Test 'help arch' which should list of supported architectures."""
|
||||
self.expect("help arch",
|
||||
substrs=['arm', 'x86_64', 'i386'])
|
||||
substrs=['arm', 'i386', 'x86_64'])
|
||||
|
||||
@no_debug_info_test
|
||||
def test_help_version(self):
|
||||
|
|
|
@ -29,4 +29,4 @@ class ProcessListTestCase(TestBase):
|
|||
self.addTearDownHook(self.cleanupSubprocesses)
|
||||
|
||||
self.expect("platform process list -v",
|
||||
substrs=["TestProcess arg1 --arg2 arg3", str(popen.pid)])
|
||||
substrs=[str(popen.pid), "TestProcess arg1 --arg2 arg3"])
|
||||
|
|
|
@ -87,8 +87,8 @@ class WatchpointPythonCommandTestCase(TestBase):
|
|||
|
||||
# Check that the watchpoint snapshoting mechanism is working.
|
||||
self.expect("watchpoint list -v",
|
||||
substrs=['old value:', ' = 0',
|
||||
'new value:', ' = 1'])
|
||||
substrs=['old value: 0',
|
||||
'new value: 1'])
|
||||
|
||||
# The watchpoint command "forced" our global variable 'cookie' to
|
||||
# become 777.
|
||||
|
|
|
@ -70,7 +70,7 @@ class WatchpointConditionCmdTestCase(TestBase):
|
|||
# Use the '-v' option to do verbose listing of the watchpoint.
|
||||
# The hit count should be 0 initially.
|
||||
self.expect("watchpoint list -v",
|
||||
substrs=['hit_count = 0', 'global==5'])
|
||||
substrs=['global==5', 'hit_count = 0'])
|
||||
|
||||
self.runCmd("process continue")
|
||||
|
||||
|
|
|
@ -62,5 +62,5 @@ class InlinedBreakpointsTestCase(TestBase):
|
|||
# And it should break at basic_type.cpp:176.
|
||||
self.expect("thread list", STOPPED_DUE_TO_BREAKPOINT,
|
||||
substrs=['stopped',
|
||||
'stop reason = breakpoint',
|
||||
'basic_type.cpp:%d' % self.line])
|
||||
'basic_type.cpp:%d' % self.line,
|
||||
'stop reason = breakpoint',])
|
||||
|
|
|
@ -77,7 +77,7 @@ class NSStringDataFormatterTestCase(TestBase):
|
|||
|
||||
def nsstring_data_formatter_commands(self):
|
||||
self.expect('frame variable str0 str1 str2 str3 str4 str5 str6 str8 str9 str10 str11 label1 label2 processName str12',
|
||||
substrs=['(NSString *) str1 = ', ' @"A rather short ASCII NSString object is here"',
|
||||
substrs=[
|
||||
# '(NSString *) str0 = ',' @"255"',
|
||||
'(NSString *) str1 = ', ' @"A rather short ASCII NSString object is here"',
|
||||
'(NSString *) str2 = ', ' @"A rather short UTF8 NSString object is here"',
|
||||
|
|
|
@ -102,17 +102,17 @@ class LibcxxSetDataFormatterTestCase(TestBase):
|
|||
self.expect(
|
||||
"frame variable ss",
|
||||
substrs=["size=4",
|
||||
'[2] = "b"',
|
||||
'[3] = "c"',
|
||||
'[0] = "a"',
|
||||
'[1] = "a very long string is right here"'])
|
||||
'[1] = "a very long string is right here"',
|
||||
'[2] = "b"',
|
||||
'[3] = "c"'])
|
||||
self.expect(
|
||||
"p ss",
|
||||
substrs=["size=4",
|
||||
'[2] = "b"',
|
||||
'[3] = "c"',
|
||||
'[0] = "a"',
|
||||
'[1] = "a very long string is right here"'])
|
||||
'[1] = "a very long string is right here"',
|
||||
'[2] = "b"',
|
||||
'[3] = "c"'])
|
||||
self.expect("frame variable ss[2]", substrs=[' = "b"'])
|
||||
lldbutil.continue_to_breakpoint(process, bkpt)
|
||||
self.expect(
|
||||
|
|
|
@ -15,8 +15,8 @@ class MultiwordCommandsTestCase(TestBase):
|
|||
self.expect("platform s", error=True,
|
||||
substrs=["ambiguous command 'platform s'. Possible completions:",
|
||||
"\tselect\n",
|
||||
"\tshell\n",
|
||||
"\tsettings\n"])
|
||||
"\tsettings\n",
|
||||
"\tshell\n"])
|
||||
|
||||
@no_debug_info_test
|
||||
def test_empty_subcommand(self):
|
||||
|
|
|
@ -41,8 +41,8 @@ class ConstStringTestCase(TestBase):
|
|||
|
||||
self.runCmd("run", RUN_SUCCEEDED)
|
||||
self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
|
||||
substrs=[" at %s:%d" % (self.main_source, self.line),
|
||||
"stop reason = breakpoint"])
|
||||
substrs=["stop reason = breakpoint",
|
||||
" at %s:%d" % (self.main_source, self.line)])
|
||||
|
||||
self.expect('expression (int)[str compare:@"hello"]',
|
||||
startstr="(int) $0 = 0")
|
||||
|
|
|
@ -167,8 +167,8 @@ class GenericTester(TestBase):
|
|||
|
||||
self.runCmd("run", RUN_SUCCEEDED)
|
||||
self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
|
||||
substrs=[" at basic_type.cpp:%d" % break_line,
|
||||
"stop reason = breakpoint"])
|
||||
substrs=["stop reason = breakpoint",
|
||||
" at basic_type.cpp:%d" % break_line,])
|
||||
|
||||
#self.runCmd("frame variable --show-types")
|
||||
|
||||
|
@ -263,8 +263,8 @@ class GenericTester(TestBase):
|
|||
|
||||
self.runCmd("run", RUN_SUCCEEDED)
|
||||
self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
|
||||
substrs=[" at basic_type.cpp:%d" % break_line,
|
||||
"stop reason = breakpoint"])
|
||||
substrs=["stop reason = breakpoint",
|
||||
" at basic_type.cpp:%d" % break_line])
|
||||
|
||||
#self.runCmd("frame variable --show-types")
|
||||
|
||||
|
|
|
@ -13,20 +13,20 @@ class CharTypeTestCase(AbstractBase.GenericTester):
|
|||
|
||||
def test_char_type(self):
|
||||
"""Test that char-type variables are displayed correctly."""
|
||||
self.build_and_run('char.cpp', set(['char']), qd=True)
|
||||
self.build_and_run('char.cpp', ['char'], qd=True)
|
||||
|
||||
@skipUnlessDarwin
|
||||
def test_char_type_from_block(self):
|
||||
"""Test that char-type variables are displayed correctly from a block."""
|
||||
self.build_and_run('char.cpp', set(['char']), bc=True, qd=True)
|
||||
self.build_and_run('char.cpp', ['char'], bc=True, qd=True)
|
||||
|
||||
def test_unsigned_char_type(self):
|
||||
"""Test that 'unsigned_char'-type variables are displayed correctly."""
|
||||
self.build_and_run(
|
||||
'unsigned_char.cpp', set(['unsigned', 'char']), qd=True)
|
||||
'unsigned_char.cpp', ['unsigned', 'char'], qd=True)
|
||||
|
||||
@skipUnlessDarwin
|
||||
def test_unsigned_char_type_from_block(self):
|
||||
"""Test that 'unsigned char'-type variables are displayed correctly from a block."""
|
||||
self.build_and_run(
|
||||
'unsigned_char.cpp', set(['unsigned', 'char']), bc=True, qd=True)
|
||||
'unsigned_char.cpp', ['unsigned', 'char'], bc=True, qd=True)
|
||||
|
|
|
@ -13,20 +13,20 @@ class CharTypeExprTestCase(AbstractBase.GenericTester):
|
|||
|
||||
def test_char_type(self):
|
||||
"""Test that char-type variable expressions are evaluated correctly."""
|
||||
self.build_and_run_expr('char.cpp', set(['char']), qd=True)
|
||||
self.build_and_run_expr('char.cpp', ['char'], qd=True)
|
||||
|
||||
@skipUnlessDarwin
|
||||
def test_char_type_from_block(self):
|
||||
"""Test that char-type variables are displayed correctly from a block."""
|
||||
self.build_and_run_expr('char.cpp', set(['char']), bc=True, qd=True)
|
||||
self.build_and_run_expr('char.cpp', ['char'], bc=True, qd=True)
|
||||
|
||||
def test_unsigned_char_type(self):
|
||||
"""Test that 'unsigned_char'-type variable expressions are evaluated correctly."""
|
||||
self.build_and_run_expr(
|
||||
'unsigned_char.cpp', set(['unsigned', 'char']), qd=True)
|
||||
'unsigned_char.cpp', ['unsigned', 'char'], qd=True)
|
||||
|
||||
@skipUnlessDarwin
|
||||
def test_unsigned_char_type_from_block(self):
|
||||
"""Test that 'unsigned char'-type variables are displayed correctly from a block."""
|
||||
self.build_and_run_expr(
|
||||
'unsigned_char.cpp', set(['unsigned', 'char']), bc=True, qd=True)
|
||||
'unsigned_char.cpp', ['unsigned', 'char'], bc=True, qd=True)
|
||||
|
|
|
@ -13,19 +13,19 @@ class IntegerTypesTestCase(AbstractBase.GenericTester):
|
|||
|
||||
def test_int_type(self):
|
||||
"""Test that int-type variables are displayed correctly."""
|
||||
self.build_and_run('int.cpp', set(['int']))
|
||||
self.build_and_run('int.cpp', ['int'])
|
||||
|
||||
@skipUnlessDarwin
|
||||
def test_int_type_from_block(self):
|
||||
"""Test that int-type variables are displayed correctly from a block."""
|
||||
self.build_and_run('int.cpp', set(['int']))
|
||||
self.build_and_run('int.cpp', ['int'])
|
||||
|
||||
def test_unsigned_int_type(self):
|
||||
"""Test that 'unsigned_int'-type variables are displayed correctly."""
|
||||
self.build_and_run('unsigned_int.cpp', set(['unsigned', 'int']))
|
||||
self.build_and_run('unsigned_int.cpp', ['unsigned', 'int'])
|
||||
|
||||
@skipUnlessDarwin
|
||||
def test_unsigned_int_type_from_block(self):
|
||||
"""Test that 'unsigned int'-type variables are displayed correctly from a block."""
|
||||
self.build_and_run(
|
||||
'unsigned_int.cpp', set(['unsigned', 'int']), bc=True)
|
||||
'unsigned_int.cpp', ['unsigned', 'int'], bc=True)
|
||||
|
|
|
@ -15,23 +15,23 @@ class IntegerTypeExprTestCase(AbstractBase.GenericTester):
|
|||
def test_unsigned_short_type_from_block(self):
|
||||
"""Test that 'unsigned short'-type variables are displayed correctly from a block."""
|
||||
self.build_and_run_expr(
|
||||
'unsigned_short.cpp', set(['unsigned', 'short']), bc=True)
|
||||
'unsigned_short.cpp', ['unsigned', 'short'], bc=True)
|
||||
|
||||
def test_int_type(self):
|
||||
"""Test that int-type variable expressions are evaluated correctly."""
|
||||
self.build_and_run_expr('int.cpp', set(['int']))
|
||||
self.build_and_run_expr('int.cpp', ['int'])
|
||||
|
||||
@skipUnlessDarwin
|
||||
def test_int_type_from_block(self):
|
||||
"""Test that int-type variables are displayed correctly from a block."""
|
||||
self.build_and_run_expr('int.cpp', set(['int']))
|
||||
self.build_and_run_expr('int.cpp', ['int'])
|
||||
|
||||
def test_unsigned_int_type(self):
|
||||
"""Test that 'unsigned_int'-type variable expressions are evaluated correctly."""
|
||||
self.build_and_run_expr('unsigned_int.cpp', set(['unsigned', 'int']))
|
||||
self.build_and_run_expr('unsigned_int.cpp', ['unsigned', 'int'])
|
||||
|
||||
@skipUnlessDarwin
|
||||
def test_unsigned_int_type_from_block(self):
|
||||
"""Test that 'unsigned int'-type variables are displayed correctly from a block."""
|
||||
self.build_and_run_expr(
|
||||
'unsigned_int.cpp', set(['unsigned', 'int']), bc=True)
|
||||
'unsigned_int.cpp', ['unsigned', 'int'], bc=True)
|
||||
|
|
|
@ -13,19 +13,19 @@ class ShortTypeTestCase(AbstractBase.GenericTester):
|
|||
|
||||
def test_short_type(self):
|
||||
"""Test that short-type variables are displayed correctly."""
|
||||
self.build_and_run('short.cpp', set(['short']))
|
||||
self.build_and_run('short.cpp', ['short'])
|
||||
|
||||
@skipUnlessDarwin
|
||||
def test_short_type_from_block(self):
|
||||
"""Test that short-type variables are displayed correctly from a block."""
|
||||
self.build_and_run('short.cpp', set(['short']), bc=True)
|
||||
self.build_and_run('short.cpp', ['short'], bc=True)
|
||||
|
||||
def test_unsigned_short_type(self):
|
||||
"""Test that 'unsigned_short'-type variables are displayed correctly."""
|
||||
self.build_and_run('unsigned_short.cpp', set(['unsigned', 'short']))
|
||||
self.build_and_run('unsigned_short.cpp', ['unsigned', 'short'])
|
||||
|
||||
@skipUnlessDarwin
|
||||
def test_unsigned_short_type_from_block(self):
|
||||
"""Test that 'unsigned short'-type variables are displayed correctly from a block."""
|
||||
self.build_and_run(
|
||||
'unsigned_short.cpp', set(['unsigned', 'short']), bc=True)
|
||||
'unsigned_short.cpp', ['unsigned', 'short'], bc=True)
|
||||
|
|
|
@ -13,20 +13,20 @@ class ShortExprTestCase(AbstractBase.GenericTester):
|
|||
|
||||
def test_short_type(self):
|
||||
"""Test that short-type variable expressions are evaluated correctly."""
|
||||
self.build_and_run_expr('short.cpp', set(['short']))
|
||||
self.build_and_run_expr('short.cpp', ['short'])
|
||||
|
||||
@skipUnlessDarwin
|
||||
def test_short_type_from_block(self):
|
||||
"""Test that short-type variables are displayed correctly from a block."""
|
||||
self.build_and_run_expr('short.cpp', set(['short']), bc=True)
|
||||
self.build_and_run_expr('short.cpp', ['short'], bc=True)
|
||||
|
||||
def test_unsigned_short_type(self):
|
||||
"""Test that 'unsigned_short'-type variable expressions are evaluated correctly."""
|
||||
self.build_and_run_expr('unsigned_short.cpp',
|
||||
set(['unsigned', 'short']))
|
||||
['unsigned', 'short'])
|
||||
|
||||
@skipUnlessDarwin
|
||||
def test_unsigned_short_type_from_block(self):
|
||||
"""Test that 'unsigned short'-type variables are displayed correctly from a block."""
|
||||
self.build_and_run_expr(
|
||||
'unsigned_short.cpp', set(['unsigned', 'short']), bc=True)
|
||||
'unsigned_short.cpp', ['unsigned', 'short'], bc=True)
|
||||
|
|
Loading…
Reference in New Issue