forked from OSchip/llvm-project
[lldb/Test] Fix substrs order in self.expect for more tests (NFC)
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
4948b8b3cf
commit
f5a71b49be
|
@ -53,12 +53,12 @@ class ArrayTypesTestCase(TestBase):
|
|||
startstr='(char *[4])',
|
||||
substrs=[
|
||||
'(char *) [0]',
|
||||
'(char *) [1]',
|
||||
'(char *) [2]',
|
||||
'(char *) [3]',
|
||||
'Hello',
|
||||
'(char *) [1]',
|
||||
'Hola',
|
||||
'(char *) [2]',
|
||||
'Bonjour',
|
||||
'(char *) [3]',
|
||||
'Guten Tag'])
|
||||
|
||||
self.expect(
|
||||
|
|
|
@ -38,9 +38,13 @@ class FunctionTypesTestCase(TestBase):
|
|||
self.runCmd("continue")
|
||||
|
||||
# Check that we do indeed stop on the string_not_empty function.
|
||||
self.expect("process status", STOPPED_DUE_TO_BREAKPOINT,
|
||||
substrs=['a.out`string_not_empty',
|
||||
'stop reason = breakpoint'])
|
||||
self.expect(
|
||||
"process status",
|
||||
STOPPED_DUE_TO_BREAKPOINT,
|
||||
substrs=[
|
||||
'stop reason = breakpoint',
|
||||
'a.out`string_not_empty',
|
||||
])
|
||||
|
||||
@expectedFailureAll(oslist=["windows"], bugnumber="llvm.org/pr21765")
|
||||
@expectedFailureNetBSD
|
||||
|
|
|
@ -80,15 +80,16 @@ class GlobalVariablesTestCase(TestBase):
|
|||
"frame variable --show-types --scope --show-globals --no-args",
|
||||
VARIABLES_DISPLAYED_CORRECTLY,
|
||||
substrs=[
|
||||
'STATIC: (const int) g_file_static_int = 2',
|
||||
'STATIC: (const char *) g_func_static_cstr',
|
||||
'"g_func_static_cstr"',
|
||||
'GLOBAL: (int *) g_ptr',
|
||||
'STATIC: (const int) g_file_static_int = 2',
|
||||
'GLOBAL: (int) g_common_1 = 21',
|
||||
'GLOBAL: (int) g_file_global_int = 42',
|
||||
'STATIC: (const char *) g_file_static_cstr',
|
||||
'"g_file_static_cstr"',
|
||||
'GLOBAL: (const char *) g_file_global_cstr',
|
||||
'"g_file_global_cstr"',
|
||||
'GLOBAL: (int) g_file_global_int = 42',
|
||||
'GLOBAL: (int) g_common_1 = 21',
|
||||
'GLOBAL: (int *) g_ptr',
|
||||
'STATIC: (const char *) g_file_static_cstr',
|
||||
'"g_file_static_cstr"'
|
||||
])
|
||||
|
||||
# 'frame variable' should support address-of operator.
|
||||
|
|
|
@ -55,8 +55,8 @@ class Char1632TestCase(TestBase):
|
|||
"frame variable cs16 cs32",
|
||||
substrs=[
|
||||
'(const char16_t *) cs16 = ',
|
||||
'(const char32_t *) cs32 = ',
|
||||
'u"hello world ྒྙྐ"',
|
||||
'(const char32_t *) cs32 = ',
|
||||
'U"hello world ྒྙྐ"'])
|
||||
|
||||
# Check that we correctly report the non-const types
|
||||
|
@ -64,8 +64,8 @@ class Char1632TestCase(TestBase):
|
|||
"frame variable s16 s32",
|
||||
substrs=[
|
||||
'(char16_t *) s16 = ',
|
||||
'(char32_t *) s32 = ',
|
||||
'u"ﺸﺵۻ"',
|
||||
'(char32_t *) s32 = ',
|
||||
'U"ЕЙРГЖО"'])
|
||||
|
||||
# Check that we correctly report the array types
|
||||
|
@ -92,8 +92,8 @@ class Char1632TestCase(TestBase):
|
|||
"frame variable s16 s32",
|
||||
substrs=[
|
||||
'(char16_t *) s16 = 0x',
|
||||
'(char32_t *) s32 = ',
|
||||
'"色ハ匂ヘト散リヌルヲ"',
|
||||
'(char32_t *) s32 = ',
|
||||
'"෴"'])
|
||||
|
||||
# check the same as above for arrays
|
||||
|
|
|
@ -45,9 +45,14 @@ class StdCXXDisassembleTestCase(TestBase):
|
|||
process = target.GetProcess()
|
||||
|
||||
# The process should be in a 'stopped' state.
|
||||
self.expect(str(process), STOPPED_DUE_TO_BREAKPOINT, exe=False,
|
||||
substrs=["a.out",
|
||||
"stopped"])
|
||||
self.expect(
|
||||
str(process),
|
||||
STOPPED_DUE_TO_BREAKPOINT,
|
||||
exe=False,
|
||||
substrs=[
|
||||
"stopped",
|
||||
"a.out",
|
||||
])
|
||||
|
||||
# Disassemble the functions on the call stack.
|
||||
self.runCmd("thread backtrace")
|
||||
|
|
|
@ -37,9 +37,13 @@ class MethodReturningBOOLTestCase(TestBase):
|
|||
self, "main.m", self.line, num_expected_locations=1, loc_exact=True)
|
||||
|
||||
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"])
|
||||
self.expect(
|
||||
"process status",
|
||||
STOPPED_DUE_TO_BREAKPOINT,
|
||||
substrs=[
|
||||
"stop reason = breakpoint",
|
||||
" at %s:%d" % (self.main_source, self.line),
|
||||
])
|
||||
|
||||
# rdar://problem/9691614
|
||||
self.runCmd('p (int)[my isValid]')
|
||||
|
|
Loading…
Reference in New Issue