Tests for step out command
This commit is contained in:
@@ -610,6 +610,7 @@ fun main(args: Array<String>) {
|
||||
model("debugger/tinyApp/src/stepInto/stepIntoAndSmartStepInto", testMethod = "doStepIntoTest", testClassName = "StepInto")
|
||||
model("debugger/tinyApp/src/stepInto/stepIntoAndSmartStepInto", testMethod = "doSmartStepIntoTest", testClassName = "SmartStepInto")
|
||||
model("debugger/tinyApp/src/stepInto/stepInto", testMethod = "doStepIntoTest", testClassName = "StepIntoOnly")
|
||||
model("debugger/tinyApp/src/stepOut", testMethod = "doStepOutTest")
|
||||
model("debugger/tinyApp/src/filters", testMethod = "doStepIntoTest")
|
||||
}
|
||||
|
||||
|
||||
@@ -46,6 +46,21 @@ public abstract class AbstractKotlinSteppingTest : KotlinDebuggerTestBase() {
|
||||
finish()
|
||||
}
|
||||
|
||||
protected fun doStepOutTest(path: String) {
|
||||
val fileText = FileUtil.loadFile(File(path))
|
||||
|
||||
configureSettings(fileText)
|
||||
|
||||
createDebugProcess(path)
|
||||
val count = findStringWithPrefixes(fileText, "// STEP_OUT: ")?.toInt() ?: 1
|
||||
|
||||
for (i in 1..count) {
|
||||
onBreakpoint { stepOut() }
|
||||
}
|
||||
|
||||
finish()
|
||||
}
|
||||
|
||||
protected fun doSmartStepIntoTest(path: String) {
|
||||
createDebugProcess(path)
|
||||
onBreakpoint { smartStepInto() }
|
||||
|
||||
@@ -115,6 +115,10 @@ abstract class KotlinDebuggerTestBase : KotlinDebuggerTestCase() {
|
||||
dp.getManagerThread()!!.schedule(dp.createStepIntoCommand(this, ignoreFilters, smartStepFilter))
|
||||
}
|
||||
|
||||
protected fun SuspendContextImpl.stepOut() {
|
||||
dp.getManagerThread()!!.schedule(dp.createStepOutCommand(this))
|
||||
}
|
||||
|
||||
protected fun SuspendContextImpl.printContext() {
|
||||
runReadAction {
|
||||
if (this.getFrameProxy() == null) {
|
||||
|
||||
Reference in New Issue
Block a user