From e5ee6f04ab2a5fb162454a5b9ccc968c3c9105f1 Mon Sep 17 00:00:00 2001 From: Jim Ingham Date: Tue, 29 Mar 2016 22:00:08 +0000 Subject: Figure out what the fixed expression is, and print it. Added another target setting to quietly apply fixits for those who really trust clang's fixits. Also, moved the retry into ClangUserExpression::Evaluate, where I can make a whole new ClangUserExpression to do the work. Reusing any of the parts of a UserExpression in situ isn't supported at present. llvm-svn: 264793 --- .../Python/lldbsuite/test/expression_command/fixits/TestFixIts.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py') diff --git a/lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py b/lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py index 7f442ab4fe1..7e11f2b201f 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py @@ -70,8 +70,12 @@ class ExprCommandWithFixits(TestBase): # Now turn off the fixits, and the expression should fail: options.SetAutoApplyFixIts(False) - value = frame.EvaluateExpression("two_error_expression", options) + value = frame.EvaluateExpression(two_error_expression, options) self.assertTrue(value.IsValid()) self.assertTrue(value.GetError().Fail()) + error_string = value.GetError().GetCString() + self.assertTrue(error_string.find("fixed expression suggested:") != -1, "Fix was suggested") + self.assertTrue(error_string.find("my_pointer->second.a") != -1, "Fix was right") + -- cgit v1.2.3