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:
+1
-1
@@ -30,7 +30,7 @@ class KotlinJavaScriptStubConsistencyTest : StubConsistencyBaseTest() {
|
|||||||
override fun getFileIds() = listOf(
|
override fun getFileIds() = listOf(
|
||||||
"jquery", "jquery.ui",
|
"jquery", "jquery.ui",
|
||||||
"kotlin", "kotlin.collections", "kotlin.browser", "kotlin.dom", "kotlin.js"
|
"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 =
|
override fun getVirtualFileFinder(): VirtualFileFinder =
|
||||||
JsVirtualFileFinder.SERVICE.getInstance(project)
|
JsVirtualFileFinder.SERVICE.getInstance(project)
|
||||||
|
|||||||
+1
-1
@@ -41,7 +41,7 @@ abstract class StubConsistencyBaseTest : KotlinLightCodeInsightFixtureTestCase()
|
|||||||
|
|
||||||
private fun doTest(id: ClassId) {
|
private fun doTest(id: ClassId) {
|
||||||
val project = project
|
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 decompiledText = getDecompiledText(packageFile)
|
||||||
val fileWithDecompiledText = KtPsiFactory(project).createFile(decompiledText)
|
val fileWithDecompiledText = KtPsiFactory(project).createFile(decompiledText)
|
||||||
val stubTreeFromDecompiledText = KtFileStubBuilder().buildStubTree(fileWithDecompiledText)
|
val stubTreeFromDecompiledText = KtFileStubBuilder().buildStubTree(fileWithDecompiledText)
|
||||||
|
|||||||
Reference in New Issue
Block a user