From 032124a17c32f65e59c4028f82fd79596b60117f Mon Sep 17 00:00:00 2001 From: Dmitry Gridin Date: Mon, 14 Sep 2020 13:50:39 +0700 Subject: [PATCH] [tests] add `wrongAbiVersionLib` to testData GitOrigin-RevId: 20b58996972cf2f0164f3c8e7eff2d3fcb08a422 --- .../stubBuilder/ClsStubForWrongAbiVersionTest.kt | 6 ++---- .../DecompiledTextForWrongAbiVersionTest.kt | 7 ++----- .../bin/ClassWithWrongAbiVersion.class | Bin 0 -> 471 bytes .../bin/META-INF/main.kotlin_module | Bin 0 -> 42 bytes .../bin/wrong/ClassWithInnerLambda$other$1.class | Bin 0 -> 1103 bytes .../bin/wrong/ClassWithInnerLambda.class | Bin 0 -> 1397 bytes .../bin/wrong/Wrong_packageKt.class | Bin 0 -> 413 bytes 7 files changed, 4 insertions(+), 9 deletions(-) create mode 100644 plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/ClassWithWrongAbiVersion.class create mode 100644 plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/META-INF/main.kotlin_module create mode 100644 plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/wrong/ClassWithInnerLambda$other$1.class create mode 100644 plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/wrong/ClassWithInnerLambda.class create mode 100644 plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/wrong/Wrong_packageKt.class diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClsStubForWrongAbiVersionTest.kt b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClsStubForWrongAbiVersionTest.kt index 2c90723af7f7..8577f0d6ba80 100644 --- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClsStubForWrongAbiVersionTest.kt +++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/decompiler/stubBuilder/ClsStubForWrongAbiVersionTest.kt @@ -7,15 +7,13 @@ package org.jetbrains.kotlin.idea.decompiler.stubBuilder import com.intellij.testFramework.LightProjectDescriptor import org.jetbrains.kotlin.idea.decompiler.textBuilder.findTestLibraryRoot +import org.jetbrains.kotlin.idea.test.IDEA_TEST_DATA_DIR import org.jetbrains.kotlin.idea.test.KotlinJdkAndLibraryProjectDescriptor -import org.jetbrains.kotlin.test.KotlinTestUtils -import org.junit.Ignore import org.junit.internal.runners.JUnit38ClassRunner import org.junit.runner.RunWith import java.io.File @RunWith(JUnit38ClassRunner::class) -@Ignore("has to be deleted as it seems a compiler test") class ClsStubBuilderForWrongAbiVersionTest : AbstractClsStubBuilderTest() { fun testPackage() = testStubsForFileWithWrongAbiVersion("Wrong_packageKt") @@ -29,6 +27,6 @@ class ClsStubBuilderForWrongAbiVersionTest : AbstractClsStubBuilderTest() { } override fun getProjectDescriptor(): LightProjectDescriptor { - return KotlinJdkAndLibraryProjectDescriptor(File(KotlinTestUtils.getTestDataPathBase() + "/cli/jvm/wrongAbiVersionLib/bin")) + return KotlinJdkAndLibraryProjectDescriptor(File(IDEA_TEST_DATA_DIR.absolutePath + "/wrongAbiVersionLib/bin")) } } diff --git a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/decompiler/textBuilder/DecompiledTextForWrongAbiVersionTest.kt b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/decompiler/textBuilder/DecompiledTextForWrongAbiVersionTest.kt index 3c62c2ba0ebe..8622c91a1368 100644 --- a/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/decompiler/textBuilder/DecompiledTextForWrongAbiVersionTest.kt +++ b/plugins/kotlin/idea/tests/test/org/jetbrains/kotlin/idea/decompiler/textBuilder/DecompiledTextForWrongAbiVersionTest.kt @@ -12,20 +12,17 @@ import org.jetbrains.kotlin.idea.decompiler.AbstractInternalCompiledClassesTest import org.jetbrains.kotlin.idea.decompiler.classFile.KtClsFile import org.jetbrains.kotlin.idea.decompiler.common.INCOMPATIBLE_ABI_VERSION_GENERAL_COMMENT import org.jetbrains.kotlin.idea.decompiler.stubBuilder.findClassFileByName +import org.jetbrains.kotlin.idea.test.IDEA_TEST_DATA_DIR import org.jetbrains.kotlin.idea.test.KotlinJdkAndLibraryProjectDescriptor -import org.jetbrains.kotlin.test.KotlinTestUtils import org.junit.Assert -import org.junit.Ignore import org.junit.internal.runners.JUnit38ClassRunner import org.junit.runner.RunWith import java.io.File @RunWith(JUnit38ClassRunner::class) -@Ignore("has to be deleted as it seems a compiler test") class DecompiledTextForWrongAbiVersionTest : AbstractInternalCompiledClassesTest() { - override fun getProjectDescriptor(): LightProjectDescriptor { - return KotlinJdkAndLibraryProjectDescriptor(File(KotlinTestUtils.getTestDataPathBase() + "/cli/jvm/wrongAbiVersionLib/bin")) + return KotlinJdkAndLibraryProjectDescriptor(File(IDEA_TEST_DATA_DIR.absolutePath + "/wrongAbiVersionLib/bin")) } fun testSyntheticClassIsInvisibleWrongAbiVersion() = doTestNoPsiFilesAreBuiltForSyntheticClasses() diff --git a/plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/ClassWithWrongAbiVersion.class b/plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/ClassWithWrongAbiVersion.class new file mode 100644 index 0000000000000000000000000000000000000000..5e5e0082bf0fd8d698e278539d65d093622e0095 GIT binary patch literal 471 zcmZ`#O;5r=5Pd@nm4XT=3TTYzMLgK(Rb$eSm=H-!{3r)b3pB7$wn=y4e|a+T;1BRe z8K*Vz#%}T^^WN;t+xh zYRa}iIND_FYGJrxH=cxqT0b6(C=iJhqbPh$fyckZt7IHL$TVp_uauF?FpyfZ>MIo+ zVR&g8*U0fM(nEZCHH-(Goo6|azx=?~dnO+;mYHS}MYtSuXk=JNlcUF4iJO&&uzJ|; YVTTdBJycK~f;4K_V@bo+*w-lh0z83dHvj+t literal 0 HcmV?d00001 diff --git a/plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/META-INF/main.kotlin_module b/plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/META-INF/main.kotlin_module new file mode 100644 index 0000000000000000000000000000000000000000..ed11a3c5941dee34b3d594c4f7d66e19476c985d GIT binary patch literal 42 ncmZQzU|?o|067rFCBem7UX-7gF2o-WqT&k@ld}`kQ@u+7X7&h} literal 0 HcmV?d00001 diff --git a/plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/wrong/ClassWithInnerLambda$other$1.class b/plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/wrong/ClassWithInnerLambda$other$1.class new file mode 100644 index 0000000000000000000000000000000000000000..1750013996a0da07efad714ba4afb99ee231b097 GIT binary patch literal 1103 zcmah|ZBG+H5Pr7T>-7y01QApOtXhh4;Ohq(l7>LiP%&7nF?`xyPrCHFo7`<{_*cFp zl4#-&@JAVEudP4=u}ODl=jEB1XXbwY`SAwmn#b#kHLB63E@|B{Yl-JWk}=FYk_Ve0_oCsPU&Fvj@-}HwCF>NoOf;pWl1BC!vYTJ- zClVh{vGNU122M78(k7LKXYsv?=X59W2+Mduk^vZm&f+D#cjz@o|J#SKs<>0dT{O(bs zX!_ibYB~$}S|&5>dD*kiIcLwa_t)?5KLD)YIbr;R=Q{P=W>aXrulz>Qaimugt?Hq$ zL4<)LaUya}!7;C^N3!PI2ogfR)IMP&T{?FCrgCyeC#~H3wo~(!>*(BePg}}oZVDjG zmRzr%JCc6Y6N(QD$8mkp1uDCKx!r8$2_zzj5T-8VQ;sh^M>KOq$M^W8s%aZB!dR^# zYsYVdCt8vtin@nFm`|6kwv)f$*)cHne5Mjd9JgZV!)?=QLutZf>H3S}@}_U@({lZW z^a#Oprb3vx9&WA^IJazLgb*o~cXkWq%`L**e@Zw#laFHzccK_Y^73WmV@;;;~o zA%MGt@S1XzzaGau495_{G$D1dtF!BV)fst*G2FR*B0bGh4>F@*mMKC^R8{5N%}Aj` z;S0iEawJ-qDFg!v$|Pum!ogJZEwP=nGDIO74+<->SIC5nU(!}!!Ya(9UfR*{YAUf& zuma1`!b-{xMI#q%W~r?^qvJV&FnC(^ISrW<|6=&!F_Sp7=^jdR%B_iJMR-b7n{wAI zg#MCpWVzj{O0VaM?x?yW{Iz_S9u!y-L?(>QVMa(080Mf`{;Q$eh Sghp0lSYxQ8SQ-yCB7Xop%2ee5 literal 0 HcmV?d00001 diff --git a/plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/wrong/Wrong_packageKt.class b/plugins/kotlin/idea/tests/testData/wrongAbiVersionLib/bin/wrong/Wrong_packageKt.class new file mode 100644 index 0000000000000000000000000000000000000000..56a09608109ff11160dc9ffe3cd10aa163bac2bd GIT binary patch literal 413 zcmZ9H%}T>S6ot=CT4P(a^{19@L^q-f4Y+kxghFUh{Gl$okehTU)1(v0OzU&Gb>Rc} zP~uGx1UKh0-x=;X_v`!P6TlUEgzj6Bn|b(L>dPx9DbLl&1t3Ca!D|jP7W*zaztoytS5i? zm{6OsV?wXdrTY`Ado9ut`LyG6eUJ{MQD9x6&D;_|X#eXhg{xaGey_MpovggcXG;E# zwNbaLWvq%Pjx!<6$9z>Js%%N