@@ -32,7 +32,7 @@ def get_to_start(self):
32
32
break_in_main = target .BreakpointCreateBySourceRegex (
33
33
'Break here to try targetted stepping' , self .main_source_spec )
34
34
self .assertTrue (break_in_main , VALID_BREAKPOINT )
35
- self .assertTrue (break_in_main .GetNumLocations () > 0 , "Has locations." )
35
+ self .assertGreater (break_in_main .GetNumLocations (), 0 , "Has locations." )
36
36
37
37
# Now launch the process, and do not stop at entry point.
38
38
process = target .LaunchSimple (
@@ -60,7 +60,7 @@ def test_with_end_line(self):
60
60
thread .StepInto ("lotsOfArgs" , self .end_line , error )
61
61
frame = thread .frames [0 ]
62
62
63
- self .assertTrue (frame .name == "lotsOfArgs" , "Stepped to lotsOfArgs." )
63
+ self .assertEqual (frame .name , "lotsOfArgs" , "Stepped to lotsOfArgs." )
64
64
65
65
@expectedFailureAll (oslist = ["windows" ], bugnumber = "llvm.org/pr32343" )
66
66
def test_with_end_line_bad_name (self ):
@@ -71,8 +71,7 @@ def test_with_end_line_bad_name(self):
71
71
error = lldb .SBError ()
72
72
thread .StepInto ("lotsOfArgssss" , self .end_line , error )
73
73
frame = thread .frames [0 ]
74
- self .assertTrue (
75
- frame .line_entry .line == self .end_line ,
74
+ self .assertEqual (frame .line_entry .line , self .end_line ,
76
75
"Stepped to the block end." )
77
76
78
77
@expectedFailureAll (oslist = ["windows" ], bugnumber = "llvm.org/pr32343" )
@@ -84,7 +83,7 @@ def test_with_end_line_deeper(self):
84
83
error = lldb .SBError ()
85
84
thread .StepInto ("modifyInt" , self .end_line , error )
86
85
frame = thread .frames [0 ]
87
- self .assertTrue (frame .name == "modifyInt" , "Stepped to modifyInt." )
86
+ self .assertEqual (frame .name , "modifyInt" , "Stepped to modifyInt." )
88
87
89
88
@expectedFailureAll (oslist = ["windows" ], bugnumber = "llvm.org/pr32343" )
90
89
def test_with_command_and_block (self ):
@@ -100,7 +99,7 @@ def test_with_command_and_block(self):
100
99
"thread step-in command succeeded." )
101
100
102
101
frame = thread .frames [0 ]
103
- self .assertTrue (frame .name == "lotsOfArgs" , "Stepped to lotsOfArgs." )
102
+ self .assertEqual (frame .name , "lotsOfArgs" , "Stepped to lotsOfArgs." )
104
103
105
104
@expectedFailureAll (oslist = ["windows" ], bugnumber = "llvm.org/pr32343" )
106
105
def test_with_command_and_block_and_bad_name (self ):
@@ -117,9 +116,8 @@ def test_with_command_and_block_and_bad_name(self):
117
116
118
117
frame = thread .frames [0 ]
119
118
120
- self .assertTrue (frame .name == "main" , "Stepped back out to main." )
119
+ self .assertEqual (frame .name , "main" , "Stepped back out to main." )
121
120
# end_line is set to the line after the containing block. Check that
122
121
# we got there:
123
- self .assertTrue (
124
- frame .line_entry .line == self .end_line ,
122
+ self .assertEqual (frame .line_entry .line , self .end_line ,
125
123
"Got out of the block" )
0 commit comments