Revert "Debugger: Add IR-powered ranking tests"

This reverts commit ce21a559

Because of the erroneous behavior in 'BuilderFactoryForDuplicateSignatureDiagnostics.groupMembersDescriptorsBySignature', two functions with arguments of different inline class types are considered to have the same JVM signature.
Before the error wasn't reported, as classes didn't have proper source elements.
This issue has to be fixed before enabling ranking tests.
This commit is contained in:
Yan Zhulanow
2019-12-13 12:14:58 +09:00
parent 1534e2b76d
commit a19f8ffe6a
10 changed files with 8 additions and 130 deletions
@@ -75,7 +75,7 @@ open class ClassCodegen protected constructor(
val descriptor = WrappedClassDescriptor()
descriptor.bind(irClass)
return state.factory.newVisitor(
irClass.OtherOrigin,
OtherOrigin(descriptor.psiElement, descriptor),
type,
irClass.fileParent.loadSourceFilesInfo()
)
@@ -58,6 +58,7 @@ import org.jetbrains.kotlin.idea.coverage.AbstractKotlinCoverageOutputFilesTest
import org.jetbrains.kotlin.idea.debugger.evaluate.*
import org.jetbrains.kotlin.idea.debugger.test.sequence.exec.AbstractSequenceTraceTestCase
import org.jetbrains.kotlin.idea.debugger.test.*
import org.jetbrains.kotlin.idea.debugger.test.AbstractFileRankingTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTestWithJS
@@ -220,10 +221,6 @@ fun main(args: Array<String>) {
model("fileRanking")
}
testClass<AbstractIrFileRankingTest> {
model("fileRanking", targetBackend = TargetBackend.JVM_IR)
}
testClass<AbstractAsyncStackTraceTest> {
model("asyncStackTrace")
}
@@ -69,6 +69,7 @@ import org.jetbrains.kotlin.idea.coverage.AbstractKotlinCoverageOutputFilesTest
import org.jetbrains.kotlin.idea.debugger.evaluate.*
import org.jetbrains.kotlin.idea.debugger.test.sequence.exec.AbstractSequenceTraceTestCase
import org.jetbrains.kotlin.idea.debugger.test.*
import org.jetbrains.kotlin.idea.debugger.test.AbstractFileRankingTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTestWithJS
@@ -227,10 +228,6 @@ fun main(args: Array<String>) {
model("fileRanking")
}
testClass<AbstractIrFileRankingTest> {
model("fileRanking", targetBackend = TargetBackend.JVM_IR)
}
testClass<AbstractAsyncStackTraceTest> {
model("asyncStackTrace")
}
@@ -66,6 +66,7 @@ import org.jetbrains.kotlin.idea.coverage.AbstractKotlinCoverageOutputFilesTest
import org.jetbrains.kotlin.idea.debugger.evaluate.*
import org.jetbrains.kotlin.idea.debugger.test.sequence.exec.AbstractSequenceTraceTestCase
import org.jetbrains.kotlin.idea.debugger.test.*
import org.jetbrains.kotlin.idea.debugger.test.AbstractFileRankingTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTestWithJS
@@ -217,10 +218,6 @@ fun main(args: Array<String>) {
model("fileRanking")
}
testClass<AbstractIrFileRankingTest> {
model("fileRanking", targetBackend = TargetBackend.JVM_IR)
}
testClass<AbstractAsyncStackTraceTest> {
model("asyncStackTrace")
}
@@ -66,6 +66,7 @@ import org.jetbrains.kotlin.idea.coverage.AbstractKotlinCoverageOutputFilesTest
import org.jetbrains.kotlin.idea.debugger.evaluate.*
import org.jetbrains.kotlin.idea.debugger.test.sequence.exec.AbstractSequenceTraceTestCase
import org.jetbrains.kotlin.idea.debugger.test.*
import org.jetbrains.kotlin.idea.debugger.test.AbstractFileRankingTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTestWithJS
@@ -217,10 +218,6 @@ fun main(args: Array<String>) {
model("fileRanking")
}
testClass<AbstractIrFileRankingTest> {
model("fileRanking", targetBackend = TargetBackend.JVM_IR)
}
testClass<AbstractAsyncStackTraceTest> {
model("asyncStackTrace")
}
@@ -66,6 +66,7 @@ import org.jetbrains.kotlin.idea.coverage.AbstractKotlinCoverageOutputFilesTest
import org.jetbrains.kotlin.idea.debugger.evaluate.*
import org.jetbrains.kotlin.idea.debugger.test.sequence.exec.AbstractSequenceTraceTestCase
import org.jetbrains.kotlin.idea.debugger.test.*
import org.jetbrains.kotlin.idea.debugger.test.AbstractFileRankingTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToDecompiledLibraryTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTest
import org.jetbrains.kotlin.idea.decompiler.navigation.AbstractNavigateToLibrarySourceTestWithJS
@@ -217,10 +218,6 @@ fun main(args: Array<String>) {
model("fileRanking")
}
testClass<AbstractIrFileRankingTest> {
model("fileRanking", targetBackend = TargetBackend.JVM_IR)
}
testClass<AbstractAsyncStackTraceTest> {
model("asyncStackTrace")
}
@@ -1,12 +0,0 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.idea.debugger.test
import org.jetbrains.kotlin.test.TargetBackend
abstract class AbstractIrFileRankingTest : AbstractFileRankingTest() {
override fun getBackend() = TargetBackend.JVM_IR
}
@@ -1,91 +0,0 @@
/*
* Copyright 2010-2019 JetBrains s.r.o. and Kotlin Programming Language contributors.
* Use of this source code is governed by the Apache 2.0 license that can be found in the license/LICENSE.txt file.
*/
package org.jetbrains.kotlin.idea.debugger.test;
import com.intellij.testFramework.TestDataPath;
import org.jetbrains.kotlin.test.JUnit3RunnerWithInners;
import org.jetbrains.kotlin.test.KotlinTestUtils;
import org.jetbrains.kotlin.test.TargetBackend;
import org.jetbrains.kotlin.test.TestMetadata;
import org.junit.runner.RunWith;
import java.io.File;
import java.util.regex.Pattern;
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
@SuppressWarnings("all")
@TestMetadata("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking")
@TestDataPath("$PROJECT_ROOT")
@RunWith(JUnit3RunnerWithInners.class)
public class IrFileRankingTestGenerated extends AbstractIrFileRankingTest {
private void runTest(String testDataFilePath) throws Exception {
KotlinTestUtils.runTest(this::doTest, TargetBackend.JVM_IR, testDataFilePath);
}
public void testAllFilesPresentInFileRanking() throws Exception {
KotlinTestUtils.assertAllTestsPresentByMetadataWithExcluded(this.getClass(), new File("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking"), Pattern.compile("^(.+)\\.kt$"), null, TargetBackend.JVM_IR, true);
}
@TestMetadata("anonymousClasses.kt")
public void testAnonymousClasses() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking/anonymousClasses.kt");
}
@TestMetadata("differentFlags.kt")
public void testDifferentFlags() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking/differentFlags.kt");
}
@TestMetadata("init.kt")
public void testInit() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking/init.kt");
}
@TestMetadata("lambdas.kt")
public void testLambdas() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking/lambdas.kt");
}
@TestMetadata("multilinePrimaryConstructor.kt")
public void testMultilinePrimaryConstructor() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking/multilinePrimaryConstructor.kt");
}
@TestMetadata("multilinePrimaryConstructorWithBody.kt")
public void testMultilinePrimaryConstructorWithBody() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking/multilinePrimaryConstructorWithBody.kt");
}
@TestMetadata("parametersWithUnloadedClass.kt")
public void testParametersWithUnloadedClass() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking/parametersWithUnloadedClass.kt");
}
@TestMetadata("propertyDelegates.kt")
public void testPropertyDelegates() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking/propertyDelegates.kt");
}
@TestMetadata("sameClassName.kt")
public void testSameClassName() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking/sameClassName.kt");
}
@TestMetadata("sameClassNameDifferentMethodNames.kt")
public void testSameClassNameDifferentMethodNames() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking/sameClassNameDifferentMethodNames.kt");
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking/simple.kt");
}
@TestMetadata("topLevel.kt")
public void testTopLevel() throws Exception {
runTest("idea/jvm-debugger/jvm-debugger-test/testData/fileRanking/topLevel.kt");
}
}
@@ -33,6 +33,4 @@ class A {
block { block { val x = 4 }}
}
}
}
// IGNORE_BACKEND: JVM_IR
}
@@ -18,6 +18,4 @@ class B {
val a by lazy {
val b = 0
}
}
// IGNORE_BACKEND: JVM_IR
}