Debugger tests: do not check breakpoint line and file extension for JDK classes

This commit is contained in:
Natalia Ukhorskaya
2014-10-09 15:58:31 +04:00
parent 1944f75802
commit 1055aa86aa
4 changed files with 10 additions and 7 deletions
@@ -2,7 +2,7 @@ LineBreakpoint created at doNotSkipClassloader.kt:7
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! doNotSkipClassloader.DoNotSkipClassloaderPackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
doNotSkipClassloader.kt:6
ClassLoader.class:98
ClassLoader.!EXT!
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -4,7 +4,7 @@ Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socke
stepIntoSpecificKotlinClasses.kt:7
MyJavaClass.java:11
stepIntoSpecificKotlinClasses.kt:7
Intrinsics.class
Intrinsics.!EXT!
stepIntoSpecificKotlinClasses.kt:7
stepIntoSpecificKotlinClasses.kt:8
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
@@ -2,8 +2,8 @@ LineBreakpoint created at stepIntoStdlib.kt:6
!JDK_HOME!\bin\java -agentlib:jdwp=transport=dt_socket,address=!HOST_NAME!:!HOST_PORT!,suspend=y,server=n -Dfile.encoding=!FILE_ENCODING! -classpath !APP_PATH!\classes;!KOTLIN_RUNTIME!;!CUSTOM_LIBRARY!;!RT_JAR! stepIntoStdlib.StepIntoStdlibPackage
Connected to the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
stepIntoStdlib.kt:5
KotlinPackage.class
_Mapping.kt
KotlinPackage.!EXT!
_Mapping.!EXT!
Disconnected from the target VM, address: '!HOST_NAME!:PORT_NAME!', transport: 'socket'
Process finished with exit code 0
@@ -24,6 +24,8 @@ import com.intellij.debugger.impl.PositionUtil
import com.intellij.execution.process.ProcessOutputTypes
import com.intellij.openapi.roots.libraries.LibraryUtil
import org.jetbrains.jet.plugin.JetJdkAndLibraryProjectDescriptor
import com.intellij.openapi.roots.JdkOrderEntry
import com.intellij.openapi.util.io.FileUtil
abstract class KotlinDebuggerTestBase : KotlinDebuggerTestCase() {
@@ -61,9 +63,10 @@ abstract class KotlinDebuggerTestBase : KotlinDebuggerTestCase() {
return@runReadAction println("VirtualFile for position is null", ProcessOutputTypes.SYSTEM)
}
val isInStdlib = LibraryUtil.findLibraryEntry(virtualFile, getProject())?.getPresentableName() == JetJdkAndLibraryProjectDescriptor.LIBRARY_NAME
if (isInStdlib) {
return@runReadAction println(virtualFile.getName(), ProcessOutputTypes.SYSTEM)
val libraryEntry = LibraryUtil.findLibraryEntry(virtualFile, getProject())
if (libraryEntry != null && (libraryEntry is JdkOrderEntry ||
libraryEntry.getPresentableName() == JetJdkAndLibraryProjectDescriptor.LIBRARY_NAME)) {
return@runReadAction println(FileUtil.getNameWithoutExtension(virtualFile.getName()) + ".!EXT!", ProcessOutputTypes.SYSTEM)
}
println(virtualFile.getName() + ":" + sourcePosition.getLine(), ProcessOutputTypes.SYSTEM)