From 9ad5d37fd917a5b8b3ffe5c12145c85021ee2578 Mon Sep 17 00:00:00 2001 From: David Spickett Date: Tue, 25 Aug 2020 16:50:03 +0100 Subject: [PATCH] [lldb] Correct wording of EXP_MSG EXP_MSG generates a message to show on assert failure. Currently it looks like: AssertionError: False is not True : '' returns expected result, got '' Which seems to say that the test failed but also got the expected result. It should say: AssertionError: False is not True : '' returned unexpected result, got '' Reviewed By: teemperor, #lldb Differential Revision: https://reviews.llvm.org/D86603 --- lldb/packages/Python/lldbsuite/test/lldbtest.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lldb/packages/Python/lldbsuite/test/lldbtest.py b/lldb/packages/Python/lldbsuite/test/lldbtest.py index de9a9a2..4180ba2 100644 --- a/lldb/packages/Python/lldbsuite/test/lldbtest.py +++ b/lldb/packages/Python/lldbsuite/test/lldbtest.py @@ -190,11 +190,11 @@ def COMPLETION_MSG(str_before, str_after, completions): def EXP_MSG(str, actual, exe): - '''A generic "'%s' returns expected result" message generator if exe. - Otherwise, it generates "'%s' matches expected result" message.''' + '''A generic "'%s' returned unexpected result" message generator if exe. + Otherwise, it generates "'%s' does not match expected result" message.''' - return "'%s' %s expected result, got '%s'" % ( - str, 'returns' if exe else 'matches', actual.strip()) + return "'%s' %s result, got '%s'" % ( + str, 'returned unexpected' if exe else 'does not match expected', actual.strip()) def SETTING_MSG(setting): -- 2.7.4