# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-from gdb_test import AssertEquals
import gdb_test
-def test(gdb):
- gdb.Command('break test_stepi_after_break')
- gdb.ResumeAndExpectStop('continue', 'breakpoint-hit')
- # From GDB/MI documentation, 'stepi' statement should be
- # gdb.ResumeAndExpectStop('stepi', 'end-stepping-range')
- # but in reality 'stepi' stop reason is simply omitted.
- gdb.ResumeCommand('stepi')
- gdb.Quit()
- return 0
+class StepIAfterBreakTest(gdb_test.GdbTest):
+
+ def test_stepi_after_break(self):
+ self.gdb.Command('break test_stepi_after_break')
+ self.gdb.ResumeAndExpectStop('continue', 'breakpoint-hit')
+ # From GDB/MI documentation, 'stepi' statement should be
+ # gdb.ResumeAndExpectStop('stepi', 'end-stepping-range')
+ # but in reality 'stepi' stop reason is simply omitted.
+ self.gdb.ResumeCommand('stepi')
if __name__ == '__main__':
- gdb_test.RunTest(test, 'stepi_after_break')
+ gdb_test.Main()