diff options
author | Jim Ingham <jingham@apple.com> | 2016-10-17 23:59:41 +0000 |
---|---|---|
committer | Jim Ingham <jingham@apple.com> | 2016-10-17 23:59:41 +0000 |
commit | 981da8d37bab92f306a86bd8b348c7e6b3797c08 (patch) | |
tree | 73d6fb565165df7bdc7fe7ac04ba293752a6ce5f /lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py | |
parent | 0d31d9c012797a50ed99ff0b1e77ff38f1cf94d1 (diff) | |
download | bcm5719-llvm-981da8d37bab92f306a86bd8b348c7e6b3797c08.tar.gz bcm5719-llvm-981da8d37bab92f306a86bd8b348c7e6b3797c08.zip |
Fix a crash in expressions with fixits in the dummy target.
In the expression command, if the target is NULL, you have to use the dummy
target.
<rdar://problem/28811687>
llvm-svn: 284439
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.py | 11 |
1 files changed, 9 insertions, 2 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 a472a014cee..418c5325ad0 100644 --- a/lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py +++ b/lldb/packages/Python/lldbsuite/test/expression_command/fixits/TestFixIts.py @@ -23,11 +23,18 @@ class ExprCommandWithFixits(TestBase): self.main_source_spec = lldb.SBFileSpec(self.main_source) @skipUnlessDarwin - def test(self): - """Test calling a function that throws and ObjC exception.""" + def test_with_target(self): + """Test calling expressions with errors that can be fixed by the FixIts.""" self.build() self.try_expressions() + def test_with_dummy_target(self): + """Test calling expressions in the dummy target with errors that can be fixed by the FixIts.""" + ret_val = lldb.SBCommandReturnObject() + result = self.dbg.GetCommandInterpreter().HandleCommand("expression ((1 << 16) - 1))", ret_val) + self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "The expression was successful.") + self.assertTrue("Fix-it applied" in ret_val.GetError(), "Found the applied FixIt.") + def try_expressions(self): """Test calling expressions with errors that can be fixed by the FixIts.""" exe_name = "a.out" |