Skip to content

Commit 53e7c8f

Browse files
committed
[lldb][NFC] Cleanup TestFixIts.py
1 parent b91535f commit 53e7c8f

File tree

1 file changed

+5
-17
lines changed

1 file changed

+5
-17
lines changed

lldb/test/API/commands/expression/fixits/TestFixIts.py

Lines changed: 5 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22
Test calling an expression with errors that a FixIt can fix.
33
"""
44

5-
6-
75
import lldb
86
from lldbsuite.test.decorators import *
97
from lldbsuite.test.lldbtest import *
@@ -14,19 +12,6 @@ class ExprCommandWithFixits(TestBase):
1412

1513
mydir = TestBase.compute_mydir(__file__)
1614

17-
def setUp(self):
18-
# Call super's setUp().
19-
TestBase.setUp(self)
20-
21-
self.main_source = "main.cpp"
22-
self.main_source_spec = lldb.SBFileSpec(self.main_source)
23-
24-
@skipUnlessDarwin
25-
def test_with_target(self):
26-
"""Test calling expressions with errors that can be fixed by the FixIts."""
27-
self.build()
28-
self.try_expressions()
29-
3015
def test_with_dummy_target(self):
3116
"""Test calling expressions in the dummy target with errors that can be fixed by the FixIts."""
3217

@@ -38,10 +23,13 @@ def test_with_dummy_target(self):
3823
self.assertEqual(result, lldb.eReturnStatusSuccessFinishResult, "The expression was successful.")
3924
self.assertTrue("Fix-it applied" in ret_val.GetError(), "Found the applied FixIt.")
4025

41-
def try_expressions(self):
26+
@skipUnlessDarwin
27+
def test_with_target(self):
4228
"""Test calling expressions with errors that can be fixed by the FixIts."""
29+
self.build()
4330
(target, process, self.thread, bkpt) = lldbutil.run_to_source_breakpoint(self,
44-
'Stop here to evaluate expressions', self.main_source_spec)
31+
'Stop here to evaluate expressions',
32+
lldb.SBFileSpec("main.cpp"))
4533

4634
options = lldb.SBExpressionOptions()
4735
options.SetAutoApplyFixIts(True)

0 commit comments

Comments
 (0)