summaryrefslogtreecommitdiffstats
path: root/lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-03-29 22:00:08 +0000
committerJim Ingham <jingham@apple.com>2016-03-29 22:00:08 +0000
commite5ee6f04ab2a5fb162454a5b9ccc968c3c9105f1 (patch)
treec4eeebf3b9e4af20d71ce73b89b59ec550b460cc /lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py
parentbd54f5bd2558c8763ce7159e6841222576707961 (diff)
downloadbcm5719-llvm-e5ee6f04ab2a5fb162454a5b9ccc968c3c9105f1.tar.gz
bcm5719-llvm-e5ee6f04ab2a5fb162454a5b9ccc968c3c9105f1.zip
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. <rdar://problem/25351938> llvm-svn: 264793
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py')
-rw-r--r--lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py6
1 files changed, 5 insertions, 1 deletions
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")
+
OpenPOWER on IntegriCloud