[lldb] Remove unused and too strict error_msg parameter from expect_expr
authorRaphael Isemann <teemperor@gmail.com>
Thu, 12 Mar 2020 23:39:32 +0000 (00:39 +0100)
committerRaphael Isemann <teemperor@gmail.com>
Thu, 12 Mar 2020 23:45:43 +0000 (00:45 +0100)
Directly matching the error message is nearly never useful. We can re-add
error-checking once we have a plan to properly implement this.

lldb/packages/Python/lldbsuite/test/lldbtest.py

index cd48747..f8f9160 100644 (file)
@@ -2396,7 +2396,6 @@ FileCheck output:
             result_summary=None,
             result_value=None,
             result_type=None,
-            error_msg=None,
             ):
         """
         Evaluates the given expression and verifies the result.
@@ -2404,7 +2403,6 @@ FileCheck output:
         :param result_summary: The summary that the expression should have. None if the summary should not be checked.
         :param result_value: The value that the expression should have. None if the value should not be checked.
         :param result_type: The type that the expression result should have. None if the type should not be checked.
-        :param error_msg: The error message the expression should return. None if the error output should not be checked.
         """
         self.assertTrue(expr.strip() == expr, "Expression contains trailing/leading whitespace: '" + expr + "'")
 
@@ -2420,11 +2418,6 @@ FileCheck output:
 
         eval_result = frame.EvaluateExpression(expr, options)
 
-        if error_msg:
-            self.assertFalse(eval_result.IsValid(), "Unexpected success with result: '" + str(eval_result) + "'")
-            self.assertEqual(error_msg, eval_result.GetError().GetCString())
-            return
-
         if not eval_result.GetError().Success():
             self.assertTrue(eval_result.GetError().Success(),
                 "Unexpected failure with msg: " + eval_result.GetError().GetCString())