Use mock JDK in compiler tests where full JDK is not needed
- move some of boxWithStdlib tests under fullJdk/ directory, where they will be compiled against the full JDK - introduce FULL_JDK in-text directive for the reflection test as only 4 tests out of 654 needed the full JDK
This commit is contained in:
+8
-3
@@ -33,6 +33,7 @@ import org.jetbrains.kotlin.idea.JetFileType;
|
||||
import org.jetbrains.kotlin.psi.JetFile;
|
||||
import org.jetbrains.kotlin.test.ConfigurationKind;
|
||||
import org.jetbrains.kotlin.test.JetTestUtils;
|
||||
import org.jetbrains.kotlin.test.TestJdkKind;
|
||||
import org.jetbrains.kotlin.utils.Printer;
|
||||
import org.junit.Assert;
|
||||
|
||||
@@ -137,9 +138,13 @@ public class CodegenTestsOnAndroidGenerator extends UsefulTestCase {
|
||||
}
|
||||
|
||||
private KotlinCoreEnvironment createEnvironment(boolean isFullJdk) {
|
||||
return isFullJdk
|
||||
? JetTestUtils.createEnvironmentWithFullJdk(myTestRootDisposable)
|
||||
: JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(myTestRootDisposable, ConfigurationKind.JDK_AND_ANNOTATIONS);
|
||||
return isFullJdk ?
|
||||
JetTestUtils.createEnvironmentWithJdkAndNullabilityAnnotationsFromIdea(
|
||||
myTestRootDisposable, ConfigurationKind.ALL, TestJdkKind.FULL_JDK
|
||||
) :
|
||||
JetTestUtils.createEnvironmentWithMockJdkAndIdeaAnnotations(
|
||||
myTestRootDisposable, ConfigurationKind.JDK_AND_ANNOTATIONS
|
||||
);
|
||||
}
|
||||
|
||||
public boolean shouldWriteFilesOnDisk() {
|
||||
|
||||
Reference in New Issue
Block a user