From 8b8fa403484ad336134f2ebe9ded1a261f8da994 Mon Sep 17 00:00:00 2001 From: Denis Zharkov Date: Tue, 29 Sep 2015 17:27:28 +0300 Subject: [PATCH] Drop tests with obsolete assumption DefaultImpls classes are not visible in IDE no more because they are inner. --- .../bin/wrong/TraitWithDefault$$TImpl.class | Bin 605 -> 0 bytes .../bin/wrong/TraitWithDefault.class | Bin 693 -> 0 bytes .../src/TraitWithDefault.kt | 5 ----- .../AbstractInternalCompiledClassesTest.kt | 18 ------------------ .../decompiler/InternalCompiledClassesTest.kt | 2 -- .../DecompiledTextForWrongAbiVersionTest.kt | 2 -- 6 files changed, 27 deletions(-) delete mode 100644 compiler/testData/cli/jvm/wrongAbiVersionLib/bin/wrong/TraitWithDefault$$TImpl.class delete mode 100644 compiler/testData/cli/jvm/wrongAbiVersionLib/bin/wrong/TraitWithDefault.class delete mode 100644 compiler/testData/cli/jvm/wrongAbiVersionLib/src/TraitWithDefault.kt diff --git a/compiler/testData/cli/jvm/wrongAbiVersionLib/bin/wrong/TraitWithDefault$$TImpl.class b/compiler/testData/cli/jvm/wrongAbiVersionLib/bin/wrong/TraitWithDefault$$TImpl.class deleted file mode 100644 index 8e4640ad252ee3b4a9d160973787c34b352b7a10..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 605 zcma)3O-~y!5Pg#b0-<~)DJ@X-Qsod3!V=dUDnx~}ux$~n(qrWf4sqhOBd<3o|Ea&A zhyDP56zwdas;#JmCC|(ozj-sZZ|}bU0C0#M!rL3~?6pX|)ZvQ`qYr8*3lln>B+90y z4kB!fd-mDn{NEHY;QLrbmOrK!WTB^Oo=d`Ds6{O zoT|{5rcme7%S;93dxV&eHgvQ+uU%)5(+*XZk9Gv)Ua99ipv3_Kj)zH#XaKTs#S)Y$&J z;twL4sG!FG3lNsEh&tn!jP@B5`%3LwX|c)n#X|-StTKAVd+|O~!)uP4Wx*0tmvd&U b$%iw`PTz&869pRX}mkFbHJV%+`(Ab6zd diff --git a/compiler/testData/cli/jvm/wrongAbiVersionLib/bin/wrong/TraitWithDefault.class b/compiler/testData/cli/jvm/wrongAbiVersionLib/bin/wrong/TraitWithDefault.class deleted file mode 100644 index ac6e941f3b76a6181fd9e3a0639acbb46fdbc6d9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 693 zcmaiy+iuf95Qb;G&cP)qIp9)5K{Be+1SG5im5_oeIYvdMftFCEsw#vw$tK;zu`7Gs za?KkdZV(qd01pLB3{?d}uopW!v;X{Sf4g75ef|Of58yV!%6S}x6Xzi2QXNWl@>Gm@ z8mIywLS@R&xD#;N-y2NDkg5!!{-^f-Od%AX3zxngl6|= z>cnCkkd-q%n>#X8A`W@r>}D!|ej2o?e;h@bi;tkI6G`2x-M@b(sqG8n-wiL%Ce0Eb z$i9dZ8HMaS4e}jv#Sz|bny%e&j$_MZstX7}>4vfXy; z0?hx2m%xOTCAbFHOHc&E01Yf6p^|gamx&w%!VSYnaYa;< zJW`iVj|wZ+!h}{D#XQhMf}50?6c@v&X`f*ABi#6~$aFdYuFyh*wQSD8EsAv#FH`NR M4;82$113=W0aog+5dZ)H diff --git a/compiler/testData/cli/jvm/wrongAbiVersionLib/src/TraitWithDefault.kt b/compiler/testData/cli/jvm/wrongAbiVersionLib/src/TraitWithDefault.kt deleted file mode 100644 index 4c81a02698d..00000000000 --- a/compiler/testData/cli/jvm/wrongAbiVersionLib/src/TraitWithDefault.kt +++ /dev/null @@ -1,5 +0,0 @@ -package wrong - -interface TraitWithDefault { - fun foo() = 1 -} \ No newline at end of file diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/AbstractInternalCompiledClassesTest.kt b/idea/tests/org/jetbrains/kotlin/idea/decompiler/AbstractInternalCompiledClassesTest.kt index b216ea5e582..f935a825ca8 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/AbstractInternalCompiledClassesTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/AbstractInternalCompiledClassesTest.kt @@ -43,24 +43,6 @@ public abstract class AbstractInternalCompiledClassesTest : JetLightCodeInsightF private fun isClassOfKind(kind: KotlinClass.Kind) : VirtualFile.() -> Boolean = isFileWithHeader { it.classKind == kind } - protected fun doTestTraitImplClassIsVisibleAsJavaClass() { - val project = getProject() - doTest("trait impl", isSyntheticClassOfKind(TRAIT_IMPL)) { - val psiFile = PsiManager.getInstance(project).findFile(this)!! - Assert.assertTrue("Should not be kotlin file", - psiFile !is JetClsFile) - Assert.assertTrue("Should be java file, was ${psiFile.javaClass.getSimpleName()}", - psiFile is ClsFileImpl) - - val decompiledPsiFile = (psiFile as PsiCompiledFile).getDecompiledPsiFile()!! - Assert.assertTrue("Should be java decompiled file, was ${decompiledPsiFile.javaClass.getSimpleName()}", - decompiledPsiFile is PsiJavaFile) - val classes = (decompiledPsiFile as PsiJavaFile).getClasses() - Assert.assertTrue("Should have some decompiled text", - classes.size() == 1 && classes[0].getName()!!.endsWith(JvmAbi.DEFAULT_IMPLS_SUFFIX)) - } - } - protected fun doTestNoFilesAreBuiltForSyntheticClass(kind: KotlinSyntheticClass.Kind): Unit = doTestNoClassFilesAreBuiltFor(kind.toString(), isSyntheticClassOfKind(kind)) diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/InternalCompiledClassesTest.kt b/idea/tests/org/jetbrains/kotlin/idea/decompiler/InternalCompiledClassesTest.kt index 13dd81fb54b..a64814445b1 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/InternalCompiledClassesTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/InternalCompiledClassesTest.kt @@ -47,8 +47,6 @@ public class InternalCompiledClassesTest : AbstractInternalCompiledClassesTest() ClassFileViewProvider.isInnerClass(this) } - fun testTraitImplClassIsVisibleAsJavaClass() = doTestTraitImplClassIsVisibleAsJavaClass() - override fun getProjectDescriptor(): LightProjectDescriptor { return JdkAndMockLibraryProjectDescriptor(TEST_DATA_PATH, /* withSources = */ false) } diff --git a/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/DecompiledTextForWrongAbiVersionTest.kt b/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/DecompiledTextForWrongAbiVersionTest.kt index a13d69e56aa..6ac8a89a780 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/DecompiledTextForWrongAbiVersionTest.kt +++ b/idea/tests/org/jetbrains/kotlin/idea/decompiler/textBuilder/DecompiledTextForWrongAbiVersionTest.kt @@ -38,8 +38,6 @@ public class DecompiledTextForWrongAbiVersionTest : AbstractInternalCompiledClas fun testPackagePartIsInvisibleWrongAbiVersion() = doTestNoPsiFilesAreBuiltForSyntheticClass(PACKAGE_PART) - fun testTraitImplClassIsVisibleAsJavaClassWrongAbiVersion() = doTestTraitImplClassIsVisibleAsJavaClass() - fun testAnonymousFunctionIsInvisibleWrongAbiVersion() = doTestNoPsiFilesAreBuiltForSyntheticClass(ANONYMOUS_FUNCTION) fun testClassWithWrongAbiVersion() = doTest("ClassWithWrongAbiVersion")