horse_badorties
08/30/2017, 1:51 PM// this is in main module
class Tester {
fun foo() {
println("main foo 1")
println("main foo 2")
println("main foo 3")
println("main foo 4")
println("main foo 5")
println("main foo 6")
println("main foo 7")
println("main foo 8")
println("main foo 9")
}
}
And this one in your test module:
import org.junit.Test
// this is in test module
class Tester {
@Test
fun testFoo() {
println("test foo 1")
println("test foo 2")
println("test foo 3")
println("test foo 4")
println("test foo 5")
println("test foo 6")
println("test foo 7")
println("test foo 8")
println("test foo 9")
}
}
Now put a breakpoint on the first line of testFoo() and debug the function.
The debugger/editor will break/jump to the same line number in main’s Tester class - fun foo() in this case - but executed will actually be the correct line in testFoo() (printlns are correct)