KJS: fix stub consistency test which was broken after JsonClass was renamed and transformed to object

`kotlin.js.Console` is used instead of `kotlin.js.JSON` to avoid problems on case-sensitive filesystems since right now we also have `kotlin.js.Json` (will be removed later)
This commit is contained in:
Zalim Bashorov
2017-01-19 22:30:13 +03:00
parent b7fb45f36e
commit cb210b6c78
2 changed files with 2 additions and 2 deletions
@@ -30,7 +30,7 @@ class KotlinJavaScriptStubConsistencyTest : StubConsistencyBaseTest() {
override fun getFileIds() = listOf(
"jquery", "jquery.ui",
"kotlin", "kotlin.collections", "kotlin.browser", "kotlin.dom", "kotlin.js"
).map { OldPackageFacadeClassUtils.getPackageClassId(FqName(it)) } + ClassId.topLevel(FqName("kotlin.js.JsonClass"))
).map { OldPackageFacadeClassUtils.getPackageClassId(FqName(it)) } + ClassId.topLevel(FqName("kotlin.js.Console"))
override fun getVirtualFileFinder(): VirtualFileFinder =
JsVirtualFileFinder.SERVICE.getInstance(project)
@@ -41,7 +41,7 @@ abstract class StubConsistencyBaseTest : KotlinLightCodeInsightFixtureTestCase()
private fun doTest(id: ClassId) {
val project = project
val packageFile = getVirtualFileFinder().findVirtualFileWithHeader(id)!!
val packageFile = getVirtualFileFinder().findVirtualFileWithHeader(id) ?: throw AssertionError("File not found for id: $id")
val decompiledText = getDecompiledText(packageFile)
val fileWithDecompiledText = KtPsiFactory(project).createFile(decompiledText)
val stubTreeFromDecompiledText = KtFileStubBuilder().buildStubTree(fileWithDecompiledText)