From abb0357123f8f024102e877d289dfcb2d0a2e2b1 Mon Sep 17 00:00:00 2001 From: Jonas Devlieghere Date: Fri, 31 Jan 2020 14:42:41 -0800 Subject: [PATCH] [lldb/Test] Fix more substr ordering issues that only repro on the bot --- .../command/TestWatchpointCommandLLDB.py | 4 +- .../libstdcpp/map/TestDataFormatterStdMap.py | 56 ++++++++-------------- 2 files changed, 23 insertions(+), 37 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py b/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py index b604d567b8c..432bd0d0b2b 100644 --- a/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py +++ b/lldb/packages/Python/lldbsuite/test/commands/watchpoints/watchpoint_commands/command/TestWatchpointCommandLLDB.py @@ -86,8 +86,8 @@ class WatchpointLLDBCommandTestCase(TestBase): self.expect( "watchpoint list -v", substrs=[ - 'old value: 0', 'new value: 1', 'hw_index = 0', - 'hit_count = 1', 'ignore_count = 0' + 'old value: 0', 'new value: 1', 'hit_count = 1', + 'ignore_count = 0' ]) # The watchpoint command "forced" our global variable 'cookie' to diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py index 94d1b573f40..0d991e569a4 100644 --- a/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py +++ b/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-stl/libstdcpp/map/TestDataFormatterStdMap.py @@ -147,41 +147,27 @@ class StdMapDataFormatterTestCase(TestBase): self.runCmd("c") - self.expect("frame variable si", - substrs=['map has 5 items', - '[0] = ', - 'first = \"zero\"', - 'second = 0', - '[1] = ', - 'first = \"one\"', - 'second = 1', - '[2] = ', - 'first = \"two\"', - 'second = 2', - '[3] = ', - 'first = \"three\"', - 'second = 3', - '[4] = ', - 'first = \"four\"', - 'second = 4']) - - self.expect("p si", - substrs=['map has 5 items', - '[0] = ', - 'first = \"zero\"', - 'second = 0', - '[1] = ', - 'first = \"one\"', - 'second = 1', - '[2] = ', - 'first = \"two\"', - 'second = 2', - '[3] = ', - 'first = \"three\"', - 'second = 3', - '[4] = ', - 'first = \"four\"', - 'second = 4']) + self.expect( + "frame variable si", + substrs=[ + 'map has 5 items', + '[0] = (first = "four", second = 4)', + '[1] = (first = "one", second = 1)', + '[2] = (first = "three", second = 3)', + '[3] = (first = "two", second = 2)', + '[4] = (first = "zero", second = 0)', + ]) + + self.expect( + "p si", + substrs=[ + 'map has 5 items', + '[0] = (first = "four", second = 4)', + '[1] = (first = "one", second = 1)', + '[2] = (first = "three", second = 3)', + '[3] = (first = "two", second = 2)', + '[4] = (first = "zero", second = 0)', + ]) # check access-by-index self.expect("frame variable si[0]", -- 2.11.0