[Lldb-commits] [PATCH] D76080: Adjust error_msg handling for expect_expr in lldbtest.py
Shafik Yaghmour via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 12 12:29:02 PDT 2020
shafik updated this revision to Diff 250021.
shafik added a comment.
Incorporate feedback on how to verify the results.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76080/new/
https://reviews.llvm.org/D76080
Files:
lldb/packages/Python/lldbsuite/test/lldbtest.py
Index: lldb/packages/Python/lldbsuite/test/lldbtest.py
===================================================================
--- lldb/packages/Python/lldbsuite/test/lldbtest.py
+++ lldb/packages/Python/lldbsuite/test/lldbtest.py
@@ -2421,8 +2421,9 @@
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())
+ self.assertTrue(eval_result.IsValid(), "Result is not valid")
+ self.assertTrue(eval_result.GetError().Fail(), "Unexpected success...")
+ self.assertTrue(eval_result.GetError().GetCString().find(error_msg) != -1)
return
if not eval_result.GetError().Success():
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76080.250021.patch
Type: text/x-patch
Size: 850 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20200312/b1eb6868/attachment.bin>
More information about the lldb-commits
mailing list