summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test
diff options
context:
space:
mode:
authorDavide Italiano <davide@freebsd.org>2019-03-13 20:04:34 +0000
committerDavide Italiano <davide@freebsd.org>2019-03-13 20:04:34 +0000
commit9e75a08409108f1a20b1be42c0ee726a912bf7a0 (patch)
tree774b1c51e78327862bdb57394b1433b746557e90 /lldb/packages/Python/lldbsuite/test
parent60a4163f6d442e2c312bb88f5c219f0ac58daf0f (diff)
downloadbcm5719-llvm-9e75a08409108f1a20b1be42c0ee726a912bf7a0.tar.gz
bcm5719-llvm-9e75a08409108f1a20b1be42c0ee726a912bf7a0.zip
[Python] Fix TestDataFormatterSmartArray to work across python versions.
Python 3 default encoding is utf-8, so taking random bytes and interpreting them as a string might result in invalid unicode sequences. As the only thing we care about here is that the formatter shows the elements of the underyling array, relax the string matching (this is good enough as all the elements are distinct so they resolve to different strings). llvm-svn: 356096
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
-rw-r--r--lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
index 54e9c346df3..e4ca6033f8a 100644
--- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
+++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-smart-array/TestDataFormatterSmartArray.py
@@ -412,26 +412,26 @@ class SmartArrayDataFormatterTestCase(TestBase):
"frame variable flarr",
substrs=[
'flarr = arr =',
- '00 00 9d 42 ...B,00 80 9a 42 ...B,00 00 9c 42 ...B,00 40 98 42 .@.B,00 80 99 42 ...B,00 c0 99 42 ...B,00 00 9a 42 ...B'])
+ '00 00 9d 42', '00 80 9a 42', '00 00 9c 42', '00 40 98 42', '00 80 99 42', '00 c0 99 42', '00 00 9a 42'])
else:
self.expect(
"frame variable flarr",
substrs=[
'flarr = arr =',
- '42 9d 00 00 B...,42 9a 80 00 B...,42 9c 00 00 B...,42 98 40 00 B.@.,42 99 80 00 B...,42 99 c0 00 B...,42 9a 00 00 B...'])
+ '42 9d 00 00', '42 9a 80 00', '42 9c 00 00', '42 98 40 00', '42 99 80 00', '42 99 c0 00', '42 9a 00 00'])
if process.GetByteOrder() == lldb.eByteOrderLittle:
self.expect(
"frame variable other.flarr",
substrs=[
'flarr = arr =',
- '00 00 cc 41 ...A,00 00 ca 41 ...A,00 00 c9 41 ...A,00 00 d6 41 ...A,00 00 db 41 ...A,00 00 dc 41 ...A,00 00 d1 41 ...A'])
+ '00 00 cc 41', '00 00 ca 41', '00 00 c9 41', '00 00 d6 41', '00 00 db 41', '00 00 dc 41', '00 00 d1 41'])
else:
self.expect(
"frame variable other.flarr",
substrs=[
'flarr = arr =',
- '41 cc 00 00 A...,41 ca 00 00 A...,41 c9 00 00 A...,41 d6 00 00 A...,41 db 00 00 A...,41 dc 00 00 A...,41 d1 00 00 A...'])
+ '41 cc 00 00', '41 ca 00 00', '41 c9 00 00', '41 d6 00 00', '41 db 00 00', '41 dc 00 00', '41 d1 00 00'])
if process.GetByteOrder() == lldb.eByteOrderLittle:
self.expect("frame variable intarr",
OpenPOWER on IntegriCloud