[Lldb-commits] [lldb] 53e7c8f - [lldb][NFC] Cleanup TestFixIts.py
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 30 00:40:25 PDT 2020
Author: Raphael Isemann
Date: 2020-03-30T09:40:03+02:00
New Revision: 53e7c8fdfaaa1172f7658aa5bb61a3282fb09a84
URL: https://github.com/llvm/llvm-project/commit/53e7c8fdfaaa1172f7658aa5bb61a3282fb09a84
DIFF: https://github.com/llvm/llvm-project/commit/53e7c8fdfaaa1172f7658aa5bb61a3282fb09a84.diff
LOG: [lldb][NFC] Cleanup TestFixIts.py
Added:
Modified:
lldb/test/API/commands/expression/fixits/TestFixIts.py
Removed:
################################################################################
diff --git a/lldb/test/API/commands/expression/fixits/TestFixIts.py b/lldb/test/API/commands/expression/fixits/TestFixIts.py
index 7aca1c5aa863..1e8e7dda68c0 100644
--- a/lldb/test/API/commands/expression/fixits/TestFixIts.py
+++ b/lldb/test/API/commands/expression/fixits/TestFixIts.py
@@ -2,8 +2,6 @@
Test calling an expression with errors that a FixIt can fix.
"""
-
-
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
@@ -14,19 +12,6 @@ class ExprCommandWithFixits(TestBase):
mydir = TestBase.compute_mydir(__file__)
- def setUp(self):
- # Call super's setUp().
- TestBase.setUp(self)
-
- self.main_source = "main.cpp"
- self.main_source_spec = lldb.SBFileSpec(self.main_source)
-
- @skipUnlessDarwin
- 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."""
@@ -38,10 +23,13 @@ def test_with_dummy_target(self):
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):
+ @skipUnlessDarwin
+ def test_with_target(self):
"""Test calling expressions with errors that can be fixed by the FixIts."""
+ self.build()
(target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
- 'Stop here to evaluate expressions', self.main_source_spec)
+ 'Stop here to evaluate expressions',
+ lldb.SBFileSpec("main.cpp"))
options = lldb.SBExpressionOptions()
options.SetAutoApplyFixIts(True)
More information about the lldb-commits
mailing list