Fix IdeaModuleInfoTest.testSdkForScript in 193
There's automatic jdk 7 registration starting from 193.
This commit is contained in:
committed by
Nikolay Krasko
parent
c9793e4bf4
commit
0d2e790b32
@@ -39,7 +39,6 @@ import org.junit.runner.RunWith
|
|||||||
|
|
||||||
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
@RunWith(JUnit3WithIdeaConfigurationRunner::class)
|
||||||
class IdeaModuleInfoTest : ModuleTestCase() {
|
class IdeaModuleInfoTest : ModuleTestCase() {
|
||||||
|
|
||||||
fun testSimpleModuleDependency() {
|
fun testSimpleModuleDependency() {
|
||||||
val (a, b) = modules()
|
val (a, b) = modules()
|
||||||
b.addDependency(a)
|
b.addDependency(a)
|
||||||
@@ -346,13 +345,18 @@ class IdeaModuleInfoTest : ModuleTestCase() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun testSdkForScript() {
|
fun testSdkForScript() {
|
||||||
|
// The first known jdk will be used for scripting if there is no jdk in the project
|
||||||
runWriteAction {
|
runWriteAction {
|
||||||
ProjectJdkTable.getInstance().addJdk(mockJdk6())
|
ProjectJdkTable.getInstance().addJdk(mockJdk6())
|
||||||
ProjectJdkTable.getInstance().addJdk(mockJdk9())
|
ProjectJdkTable.getInstance().addJdk(mockJdk9())
|
||||||
|
|
||||||
|
ProjectRootManager.getInstance(project).projectSdk = null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val firstSDK = ProjectJdkTable.getInstance().allJdks.first()
|
||||||
|
|
||||||
with(createFileInProject("script.kts").moduleInfo) {
|
with(createFileInProject("script.kts").moduleInfo) {
|
||||||
dependencies().filterIsInstance<SdkInfo>().single { it.sdk == mockJdk6() }
|
dependencies().filterIsInstance<SdkInfo>().single { it.sdk == firstSDK }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user