2
2
Test calling an expression with errors that a FixIt can fix.
3
3
"""
4
4
5
-
6
-
7
5
import lldb
8
6
from lldbsuite .test .decorators import *
9
7
from lldbsuite .test .lldbtest import *
@@ -14,19 +12,6 @@ class ExprCommandWithFixits(TestBase):
14
12
15
13
mydir = TestBase .compute_mydir (__file__ )
16
14
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
-
30
15
def test_with_dummy_target (self ):
31
16
"""Test calling expressions in the dummy target with errors that can be fixed by the FixIts."""
32
17
@@ -38,10 +23,13 @@ def test_with_dummy_target(self):
38
23
self .assertEqual (result , lldb .eReturnStatusSuccessFinishResult , "The expression was successful." )
39
24
self .assertTrue ("Fix-it applied" in ret_val .GetError (), "Found the applied FixIt." )
40
25
41
- def try_expressions (self ):
26
+ @skipUnlessDarwin
27
+ def test_with_target (self ):
42
28
"""Test calling expressions with errors that can be fixed by the FixIts."""
29
+ self .build ()
43
30
(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" ))
45
33
46
34
options = lldb .SBExpressionOptions ()
47
35
options .SetAutoApplyFixIts (True )
0 commit comments