Move FIR tests to fir modules
This commit is contained in:
committed by
Mikhail Glukhikh
parent
95af0268b8
commit
cfb446df9e
@@ -54,6 +54,8 @@ dependencies {
|
||||
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
testCompile(projectTests(":compiler:fir:psi2fir"))
|
||||
testCompile(projectTests(":compiler:fir:resolve"))
|
||||
testCompile(projectTests(":generators:test-generator"))
|
||||
testCompile(project(":compiler:ir.ir2cfg"))
|
||||
testCompile(project(":compiler:ir.tree")) // used for deepCopyWithSymbols call that is removed by proguard from the compiler TODO: make it more straightforward
|
||||
|
||||
@@ -16,9 +16,27 @@ dependencies {
|
||||
compile(project(":compiler:fir:tree"))
|
||||
|
||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "annotations") }
|
||||
|
||||
testRuntime(intellijDep())
|
||||
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
|
||||
testCompileOnly(project(":kotlin-reflect-api"))
|
||||
testRuntime(project(":kotlin-reflect"))
|
||||
|
||||
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
testsJar()
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* Copyright 2010-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license
|
||||
* that can be found in the license/LICENSE.txt file.
|
||||
*/
|
||||
|
||||
@@ -33,7 +33,7 @@ import java.io.File
|
||||
import kotlin.reflect.full.memberProperties
|
||||
|
||||
abstract class AbstractRawFirBuilderTestCase : KtParsingTestCase(
|
||||
".",
|
||||
"",
|
||||
"kt",
|
||||
KotlinParserDefinition()
|
||||
) {
|
||||
+22
-22
@@ -17,7 +17,7 @@ import java.util.regex.Pattern;
|
||||
|
||||
/** This class is generated by {@link org.jetbrains.kotlin.generators.tests.TestsPackage}. DO NOT MODIFY MANUALLY */
|
||||
@SuppressWarnings("all")
|
||||
@TestMetadata("compiler/testData/fir/rawBuilder")
|
||||
@TestMetadata("compiler/fir/psi2fir/testData/rawBuilder")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class RawFirBuilderTestCaseGenerated extends AbstractRawFirBuilderTestCase {
|
||||
@@ -26,10 +26,10 @@ public class RawFirBuilderTestCaseGenerated extends AbstractRawFirBuilderTestCas
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInRawBuilder() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/fir/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("compiler/testData/fir/rawBuilder/declarations")
|
||||
@TestMetadata("compiler/fir/psi2fir/testData/rawBuilder/declarations")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public static class Declarations extends AbstractRawFirBuilderTestCase {
|
||||
@@ -38,97 +38,97 @@ public class RawFirBuilderTestCaseGenerated extends AbstractRawFirBuilderTestCas
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInDeclarations() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/fir/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/fir/psi2fir/testData/rawBuilder/declarations"), Pattern.compile("^(.+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("complexTypes.kt")
|
||||
public void testComplexTypes() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/complexTypes.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/complexTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("derivedClass.kt")
|
||||
public void testDerivedClass() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/derivedClass.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/derivedClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enums.kt")
|
||||
public void testEnums() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/enums.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/enums.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enums2.kt")
|
||||
public void testEnums2() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/enums2.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/enums2.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("expectActual.kt")
|
||||
public void testExpectActual() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/expectActual.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/expectActual.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("F.kt")
|
||||
public void testF() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/F.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/F.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("functionTypes.kt")
|
||||
public void testFunctionTypes() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/functionTypes.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/functionTypes.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("genericFunctions.kt")
|
||||
public void testGenericFunctions() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/genericFunctions.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/genericFunctions.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("nestedClass.kt")
|
||||
public void testNestedClass() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/nestedClass.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/nestedClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NestedOfAliasedType.kt")
|
||||
public void testNestedOfAliasedType() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/NestedOfAliasedType.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedOfAliasedType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NestedSuperType.kt")
|
||||
public void testNestedSuperType() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/NestedSuperType.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/NestedSuperType.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("noPrimaryConstructor.kt")
|
||||
public void testNoPrimaryConstructor() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/noPrimaryConstructor.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/noPrimaryConstructor.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleClass.kt")
|
||||
public void testSimpleClass() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/simpleClass.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleFun.kt")
|
||||
public void testSimpleFun() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/simpleFun.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleFun.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("simpleTypeAlias.kt")
|
||||
public void testSimpleTypeAlias() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/simpleTypeAlias.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/simpleTypeAlias.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeAliasWithGeneric.kt")
|
||||
public void testTypeAliasWithGeneric() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/typeAliasWithGeneric.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeAliasWithGeneric.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeParameterVsNested.kt")
|
||||
public void testTypeParameterVsNested() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/typeParameterVsNested.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameterVsNested.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("typeParameters.kt")
|
||||
public void testTypeParameters() throws Exception {
|
||||
runTest("compiler/testData/fir/rawBuilder/declarations/typeParameters.kt");
|
||||
runTest("compiler/fir/psi2fir/testData/rawBuilder/declarations/typeParameters.kt");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,9 +17,29 @@ dependencies {
|
||||
compile(project(":compiler:fir:tree"))
|
||||
|
||||
compileOnly(intellijCoreDep()) { includeJars("intellij-core", "annotations") }
|
||||
|
||||
testCompileOnly(intellijDep()) { includeJars("openapi", "idea", "idea_rt", "util", "asm-all", rootProject = rootProject) }
|
||||
|
||||
|
||||
testRuntime(intellijDep())
|
||||
|
||||
testCompile(commonDep("junit:junit"))
|
||||
testCompileOnly(project(":kotlin-test:kotlin-test-jvm"))
|
||||
testCompileOnly(project(":kotlin-test:kotlin-test-junit"))
|
||||
testCompile(projectTests(":compiler:tests-common"))
|
||||
|
||||
testCompileOnly(project(":kotlin-reflect-api"))
|
||||
testRuntime(project(":kotlin-reflect"))
|
||||
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
"main" { projectDefault() }
|
||||
"test" {}
|
||||
}
|
||||
"test" { projectDefault() }
|
||||
}
|
||||
|
||||
projectTest {
|
||||
workingDir = rootDir
|
||||
}
|
||||
|
||||
testsJar()
|
||||
Vendored
Vendored
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user