Minor, rename jdkFromIdeaHome -> mockJdk
This commit is contained in:
@@ -81,7 +81,7 @@ public class KotlinAndJavaCheckerTest extends KotlinDaemonAnalyzerTestCase {
|
||||
|
||||
@Override
|
||||
protected Sdk getTestProjectJdk() {
|
||||
return PluginTestCaseBase.jdkFromIdeaHome();
|
||||
return PluginTestCaseBase.mockJdk();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -49,7 +49,7 @@ public class JetJdkAndLibraryProjectDescriptor implements LightProjectDescriptor
|
||||
|
||||
@Override
|
||||
public Sdk getSdk() {
|
||||
return PluginTestCaseBase.jdkFromIdeaHome();
|
||||
return PluginTestCaseBase.mockJdk();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -37,7 +37,7 @@ public class JetLightProjectDescriptor implements LightProjectDescriptor {
|
||||
|
||||
@Override
|
||||
public Sdk getSdk() {
|
||||
return PluginTestCaseBase.jdkFromIdeaHome();
|
||||
return PluginTestCaseBase.mockJdk();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -50,7 +50,7 @@ public class PluginTestCaseBase {
|
||||
return sdk;
|
||||
}
|
||||
|
||||
public static Sdk jdkFromIdeaHome() {
|
||||
public static Sdk mockJdk() {
|
||||
return getSdk("compiler/testData/mockJDK/jre");
|
||||
}
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ public abstract class AbstractJetInspectionTest: LightCodeInsightFixtureTestCase
|
||||
if (isWithRuntime) {
|
||||
ConfigLibraryUtil.configureKotlinRuntime(
|
||||
myFixture.getModule(),
|
||||
if (fullJdk) PluginTestCaseBase.fullJdk() else PluginTestCaseBase.jdkFromIdeaHome()
|
||||
if (fullJdk) PluginTestCaseBase.fullJdk() else PluginTestCaseBase.mockJdk()
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -219,6 +219,6 @@ public abstract class AbstractHierarchyTest extends KotlinHierarchyViewTestBase
|
||||
|
||||
@Override
|
||||
protected Sdk getTestProjectJdk() {
|
||||
return PluginTestCaseBase.jdkFromIdeaHome();
|
||||
return PluginTestCaseBase.mockJdk();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,7 +117,7 @@ public abstract class AbstractIntentionTest extends KotlinCodeInsightTestCase {
|
||||
|
||||
try {
|
||||
if (isWithRuntime) {
|
||||
ConfigLibraryUtil.configureKotlinRuntime(getModule(), PluginTestCaseBase.jdkFromIdeaHome());
|
||||
ConfigLibraryUtil.configureKotlinRuntime(getModule(), PluginTestCaseBase.mockJdk());
|
||||
}
|
||||
|
||||
DirectiveBasedActionUtils.checkForUnexpectedErrors((JetFile) getFile());
|
||||
|
||||
@@ -70,7 +70,7 @@ public class JetGotoImplementationTest extends LightCodeInsightTestCase {
|
||||
|
||||
@Override
|
||||
protected Sdk getProjectJDK() {
|
||||
return PluginTestCaseBase.jdkFromIdeaHome();
|
||||
return PluginTestCaseBase.mockJdk();
|
||||
}
|
||||
|
||||
protected void doTest() {
|
||||
|
||||
@@ -74,7 +74,7 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer
|
||||
|
||||
boolean withRuntime = InTextDirectivesUtils.isDirectiveDefined(originalFileText, "// WITH_RUNTIME");
|
||||
if (withRuntime) {
|
||||
ConfigLibraryUtil.configureKotlinRuntime(myModule, PluginTestCaseBase.jdkFromIdeaHome());
|
||||
ConfigLibraryUtil.configureKotlinRuntime(myModule, PluginTestCaseBase.mockJdk());
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -142,7 +142,7 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer
|
||||
}
|
||||
finally {
|
||||
if (withRuntime) {
|
||||
ConfigLibraryUtil.unConfigureKotlinRuntime(myModule, PluginTestCaseBase.jdkFromIdeaHome());
|
||||
ConfigLibraryUtil.unConfigureKotlinRuntime(myModule, PluginTestCaseBase.mockJdk());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -212,7 +212,7 @@ public abstract class AbstractQuickFixMultiFileTest extends KotlinDaemonAnalyzer
|
||||
|
||||
@Override
|
||||
protected Sdk getTestProjectJdk() {
|
||||
return PluginTestCaseBase.jdkFromIdeaHome();
|
||||
return PluginTestCaseBase.mockJdk();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -167,7 +167,7 @@ public abstract class AbstractQuickFixTest extends KotlinLightQuickFixTestCase {
|
||||
|
||||
@Override
|
||||
protected Sdk getProjectJDK() {
|
||||
return PluginTestCaseBase.jdkFromIdeaHome();
|
||||
return PluginTestCaseBase.mockJdk();
|
||||
}
|
||||
|
||||
protected static Sdk getFullJavaJDK() {
|
||||
|
||||
+1
-1
@@ -976,6 +976,6 @@ public class JetChangeSignatureTest extends KotlinCodeInsightTestCase {
|
||||
|
||||
@Override
|
||||
protected Sdk getTestProjectJdk() {
|
||||
return PluginTestCaseBase.jdkFromIdeaHome();
|
||||
return PluginTestCaseBase.mockJdk();
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -185,7 +185,7 @@ public abstract class AbstractJetExtractionTest() : JetLightCodeInsightFixtureTe
|
||||
|
||||
val addKotlinRuntime = InTextDirectivesUtils.findStringWithPrefixes(file.getText(), "// WITH_RUNTIME") != null
|
||||
if (addKotlinRuntime) {
|
||||
ConfigLibraryUtil.configureKotlinRuntime(myModule, PluginTestCaseBase.jdkFromIdeaHome())
|
||||
ConfigLibraryUtil.configureKotlinRuntime(myModule, PluginTestCaseBase.mockJdk())
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -200,7 +200,7 @@ public abstract class AbstractJetExtractionTest() : JetLightCodeInsightFixtureTe
|
||||
}
|
||||
finally {
|
||||
if (addKotlinRuntime) {
|
||||
ConfigLibraryUtil.unConfigureKotlinRuntime(myModule, PluginTestCaseBase.jdkFromIdeaHome())
|
||||
ConfigLibraryUtil.unConfigureKotlinRuntime(myModule, PluginTestCaseBase.mockJdk())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ public abstract class AbstractJetMoveTest : KotlinMultiFileTestCase() {
|
||||
|
||||
val withRuntime = config["withRuntime"]?.getAsBoolean() ?: false
|
||||
if (withRuntime) {
|
||||
ConfigLibraryUtil.configureKotlinRuntime(myModule, PluginTestCaseBase.jdkFromIdeaHome())
|
||||
ConfigLibraryUtil.configureKotlinRuntime(myModule, PluginTestCaseBase.mockJdk())
|
||||
}
|
||||
|
||||
doTest({ rootDir, rootAfter ->
|
||||
@@ -114,7 +114,7 @@ public abstract class AbstractJetMoveTest : KotlinMultiFileTestCase() {
|
||||
EditorFactory.getInstance()!!.releaseEditor(editor)
|
||||
|
||||
if (withRuntime) {
|
||||
ConfigLibraryUtil.unConfigureKotlinRuntime(myModule, PluginTestCaseBase.jdkFromIdeaHome())
|
||||
ConfigLibraryUtil.unConfigureKotlinRuntime(myModule, PluginTestCaseBase.mockJdk())
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -102,7 +102,7 @@ class RunConfigurationTest: CodeInsightTestCase() {
|
||||
val createModuleResult = configureModule(moduleDirPath("module"), baseDir)
|
||||
val srcDir = createModuleResult.srcDir
|
||||
|
||||
configureRuntime(createModuleResult.module, PluginTestCaseBase.jdkFromIdeaHome())
|
||||
configureRuntime(createModuleResult.module, PluginTestCaseBase.mockJdk())
|
||||
|
||||
try {
|
||||
val expectedClasses = ArrayList<String>()
|
||||
@@ -132,7 +132,7 @@ class RunConfigurationTest: CodeInsightTestCase() {
|
||||
Assert.assertEquals(expectedClasses, actualClasses)
|
||||
}
|
||||
finally {
|
||||
ConfigLibraryUtil.unConfigureKotlinRuntime(createModuleResult.module, PluginTestCaseBase.jdkFromIdeaHome())
|
||||
ConfigLibraryUtil.unConfigureKotlinRuntime(createModuleResult.module, PluginTestCaseBase.mockJdk())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -184,7 +184,7 @@ class RunConfigurationTest: CodeInsightTestCase() {
|
||||
}
|
||||
|
||||
override fun getTestDataPath() = PluginTestCaseBase.getTestDataPathBase() + "/run/"
|
||||
override fun getTestProjectJdk() = PluginTestCaseBase.jdkFromIdeaHome()
|
||||
override fun getTestProjectJdk() = PluginTestCaseBase.mockJdk()
|
||||
|
||||
private class CreateModuleResult(
|
||||
val module: Module,
|
||||
|
||||
Reference in New Issue
Block a user