From: Raphael Isemann Date: Mon, 30 Mar 2020 07:19:59 +0000 (+0200) Subject: [lldb][NFC] Cleanup TestFixIts.py X-Git-Tag: llvmorg-12-init~10766 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53e7c8fdfaaa1172f7658aa5bb61a3282fb09a84;p=platform%2Fupstream%2Fllvm.git [lldb][NFC] Cleanup TestFixIts.py --- diff --git a/lldb/test/API/commands/expression/fixits/TestFixIts.py b/lldb/test/API/commands/expression/fixits/TestFixIts.py index 7aca1c5..1e8e7dd 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 @@ class ExprCommandWithFixits(TestBase): 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)