Add Java symbol resolve in default star importing scope
Related to KT-24098
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.fir
|
||||
|
||||
import org.jetbrains.kotlin.cli.jvm.compiler.KotlinCoreEnvironment
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind
|
||||
import org.jetbrains.kotlin.test.TestJdkKind
|
||||
|
||||
abstract class AbstractFirResolveTestCaseWithStdlib : AbstractFirResolveTestCase() {
|
||||
override fun createEnvironment(): KotlinCoreEnvironment {
|
||||
return createEnvironmentWithJdk(ConfigurationKind.ALL, TestJdkKind.FULL_JDK)
|
||||
}
|
||||
}
|
||||
@@ -26,13 +26,12 @@ public class FirResolveTestCaseGenerated extends AbstractFirResolveTestCase {
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInResolve() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/fir/resolve"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true);
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/fir/resolve"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true, "stdlib");
|
||||
}
|
||||
|
||||
@TestMetadata("derivedClass.kt")
|
||||
public void testDerivedClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/fir/resolve/derivedClass.kt");
|
||||
doTest(fileName);
|
||||
runTest("compiler/testData/fir/resolve/derivedClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("enum.kt")
|
||||
@@ -62,8 +61,7 @@ public class FirResolveTestCaseGenerated extends AbstractFirResolveTestCase {
|
||||
|
||||
@TestMetadata("nestedClass.kt")
|
||||
public void testNestedClass() throws Exception {
|
||||
String fileName = KotlinTestUtils.navigationMetadata("compiler/testData/fir/resolve/nestedClass.kt");
|
||||
doTest(fileName);
|
||||
runTest("compiler/testData/fir/resolve/nestedClass.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("NestedOfAliasedType.kt")
|
||||
|
||||
+41
@@ -0,0 +1,41 @@
|
||||
/*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
package org.jetbrains.kotlin.fir;
|
||||
|
||||
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("compiler/testData/fir/resolve/stdlib")
|
||||
@TestDataPath("$PROJECT_ROOT")
|
||||
@RunWith(JUnit3RunnerWithInners.class)
|
||||
public class FirResolveTestCaseWithStdlibGenerated extends AbstractFirResolveTestCaseWithStdlib {
|
||||
private void runTest(String testDataFilePath) throws Exception {
|
||||
KotlinTestUtils.runTest(this::doTest, TargetBackend.ANY, testDataFilePath);
|
||||
}
|
||||
|
||||
public void testAllFilesPresentInStdlib() throws Exception {
|
||||
KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("compiler/testData/fir/resolve/stdlib"), Pattern.compile("^([^.]+)\\.kt$"), TargetBackend.ANY, true);
|
||||
}
|
||||
|
||||
@TestMetadata("concurrent.kt")
|
||||
public void testConcurrent() throws Exception {
|
||||
runTest("compiler/testData/fir/resolve/stdlib/concurrent.kt");
|
||||
}
|
||||
|
||||
@TestMetadata("reflectionClass.kt")
|
||||
public void testReflectionClass() throws Exception {
|
||||
runTest("compiler/testData/fir/resolve/stdlib/reflectionClass.kt");
|
||||
}
|
||||
}
|
||||
@@ -18,6 +18,7 @@ import org.jetbrains.kotlin.codegen.defaultConstructor.AbstractDefaultArgumentsR
|
||||
import org.jetbrains.kotlin.codegen.flags.AbstractWriteFlagsTest
|
||||
import org.jetbrains.kotlin.codegen.ir.*
|
||||
import org.jetbrains.kotlin.fir.AbstractFirResolveTestCase
|
||||
import org.jetbrains.kotlin.fir.AbstractFirResolveTestCaseWithStdlib
|
||||
import org.jetbrains.kotlin.fir.builder.AbstractRawFirBuilderTestCase
|
||||
import org.jetbrains.kotlin.generators.tests.generator.testGroup
|
||||
import org.jetbrains.kotlin.generators.util.KT_OR_KTS_WITHOUT_DOTS_IN_NAME
|
||||
@@ -206,7 +207,11 @@ fun main(args: Array<String>) {
|
||||
}
|
||||
|
||||
testClass<AbstractFirResolveTestCase> {
|
||||
model("fir/resolve", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
||||
model("fir/resolve", pattern = KT_WITHOUT_DOTS_IN_NAME, excludeDirs = listOf("stdlib"))
|
||||
}
|
||||
|
||||
testClass<AbstractFirResolveTestCaseWithStdlib> {
|
||||
model("fir/resolve/stdlib", pattern = KT_WITHOUT_DOTS_IN_NAME)
|
||||
}
|
||||
|
||||
testClass<AbstractBytecodeListingTest> {
|
||||
|
||||
Reference in New Issue
Block a user