Disable old Parcelable quickfixes if @Parcelize annotation is present

This commit is contained in:
Yan Zhulanow
2017-09-12 23:53:15 +03:00
committed by Yan Zhulanow
parent e6171dc4c5
commit d9f99971bb
10 changed files with 48 additions and 0 deletions
@@ -38,6 +38,8 @@ abstract class AbstractAndroidIntentionTest : KotlinAndroidTestCase() {
val checkManifest = InTextDirectivesUtils.isDirectiveDefined(testFileText, "// CHECK_MANIFEST")
try {
ConfigLibraryUtil.addLibrary(myModule, "androidExtensionsRuntime",
"dist/kotlinc/lib", arrayOf("android-extensions-runtime.jar"))
if (withRuntime) {
ConfigLibraryUtil.configureKotlinRuntime(myFixture.module)
}
@@ -74,6 +76,7 @@ abstract class AbstractAndroidIntentionTest : KotlinAndroidTestCase() {
}
}
finally {
ConfigLibraryUtil.removeLibrary(myModule, "androidExtensionsRuntime")
if (withRuntime) {
ConfigLibraryUtil.unConfigureKotlinRuntime(myFixture.module)
}
@@ -356,6 +356,12 @@ public class AndroidIntentionTestGenerated extends AbstractAndroidIntentionTest
doTest(fileName);
}
@TestMetadata("parcelize.kt")
public void testParcelize() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/redoParcelable/parcelize.kt");
doTest(fileName);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/redoParcelable/simple.kt");
@@ -395,6 +401,12 @@ public class AndroidIntentionTestGenerated extends AbstractAndroidIntentionTest
doTest(fileName);
}
@TestMetadata("parcelize.kt")
public void testParcelize() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/removeParcelable/parcelize.kt");
doTest(fileName);
}
@TestMetadata("simple.kt")
public void testSimple() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("idea/testData/android/intention/removeParcelable/simple.kt");