Minor: Fix test data

This commit is contained in:
Alexey Sedunov
2018-08-15 17:48:57 +03:00
parent f5a80a30f7
commit 443f8b6f02
4 changed files with 20 additions and 8 deletions
@@ -1399,7 +1399,11 @@ compileTestKotlin {
} }
val rootManager = ModuleRootManager.getInstance(getModule("js-module")) val rootManager = ModuleRootManager.getInstance(getModule("js-module"))
val stdlib = rootManager.orderEntries.filterIsInstance<LibraryOrderEntry>().single().library!! val stdlib = rootManager
.orderEntries
.filterIsInstance<LibraryOrderEntry>()
.first { it.libraryName?.startsWith("Gradle: kotlin-stdlib-js-") ?: false }
.library!!
assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty()) assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty())
assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind) assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind)
} }
@@ -2262,7 +2266,7 @@ compileTestKotlin {
importProject() importProject()
Assert.assertEquals( Assert.assertEquals(
"-Xdump-declarations-to=tmpTest", "-version",
testFacetSettings.compilerSettings!!.additionalArguments testFacetSettings.compilerSettings!!.additionalArguments
) )
@@ -1209,7 +1209,11 @@ compileTestKotlin {
} }
val rootManager = ModuleRootManager.getInstance(getModule("js-module")) val rootManager = ModuleRootManager.getInstance(getModule("js-module"))
val stdlib = rootManager.orderEntries.filterIsInstance<LibraryOrderEntry>().single().library!! val stdlib = rootManager
.orderEntries
.filterIsInstance<LibraryOrderEntry>()
.first { it.libraryName?.startsWith("Gradle: kotlin-stdlib-js-") ?: false }
.library!!
assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty()) assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty())
assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind) assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind)
} }
@@ -2011,7 +2015,7 @@ compileTestKotlin {
importProject() importProject()
Assert.assertEquals( Assert.assertEquals(
"-Xdump-declarations-to=tmpTest", "-version",
testFacetSettings.compilerSettings!!.additionalArguments testFacetSettings.compilerSettings!!.additionalArguments
) )
@@ -1209,7 +1209,11 @@ compileTestKotlin {
} }
val rootManager = ModuleRootManager.getInstance(getModule("js-module")) val rootManager = ModuleRootManager.getInstance(getModule("js-module"))
val stdlib = rootManager.orderEntries.filterIsInstance<LibraryOrderEntry>().single().library!! val stdlib = rootManager
.orderEntries
.filterIsInstance<LibraryOrderEntry>()
.first { it.libraryName?.startsWith("Gradle: kotlin-stdlib-js-") ?: false }
.library!!
assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty()) assertTrue(stdlib.getFiles(OrderRootType.CLASSES).isNotEmpty())
assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind) assertEquals(JSLibraryKind, (stdlib as LibraryEx).kind)
} }
@@ -2011,7 +2015,7 @@ compileTestKotlin {
importProject() importProject()
Assert.assertEquals( Assert.assertEquals(
"-Xdump-declarations-to=tmpTest", "-version",
testFacetSettings.compilerSettings!!.additionalArguments testFacetSettings.compilerSettings!!.additionalArguments
) )
@@ -21,8 +21,8 @@ class KotlinFrameworkSupportProviderTest : FrameworkSupportProviderTestCase() {
addSupport() addSupport()
with (KotlinCommonCompilerArgumentsHolder.getInstance(module.project).settings) { with (KotlinCommonCompilerArgumentsHolder.getInstance(module.project).settings) {
TestCase.assertEquals(VersionView.Specific(LanguageVersion.LATEST_STABLE), languageVersionView) TestCase.assertEquals(VersionView.LatestStable, languageVersionView)
TestCase.assertEquals(VersionView.Specific(LanguageVersion.LATEST_STABLE), apiVersionView) TestCase.assertEquals(VersionView.LatestStable, apiVersionView)
} }
} }