From f5bb9d58663d551af975bef50f351ee5b25eaa2b Mon Sep 17 00:00:00 2001 From: Yan Zhulanow Date: Mon, 3 Dec 2018 22:19:48 +0900 Subject: [PATCH] Remove Lint tests for annotation argument API check. Looks like newer Lint API checker ignores type usage in annotations, so these tests are no more needed. --- .../AndroidLintQuickfixTestGenerated.java | 10 ---------- .../lintQuickfix/requiresApi/annotation.kt | 12 ------------ .../lintQuickfix/requiresApi/annotation.kt.173 | 12 ------------ .../lintQuickfix/requiresApi/annotation.kt.as31 | 12 ------------ .../requiresApi/annotation.kt.expected | 15 --------------- .../requiresApi/annotation.kt.expected.173 | 15 --------------- .../requiresApi/annotation.kt.expected.as31 | 15 --------------- .../android/lintQuickfix/targetApi/annotation.kt | 11 ----------- .../lintQuickfix/targetApi/annotation.kt.173 | 11 ----------- .../lintQuickfix/targetApi/annotation.kt.as31 | 11 ----------- .../lintQuickfix/targetApi/annotation.kt.expected | 14 -------------- .../targetApi/annotation.kt.expected.173 | 14 -------------- .../targetApi/annotation.kt.expected.as31 | 14 -------------- 13 files changed, 166 deletions(-) delete mode 100644 idea/testData/android/lintQuickfix/requiresApi/annotation.kt delete mode 100644 idea/testData/android/lintQuickfix/requiresApi/annotation.kt.173 delete mode 100644 idea/testData/android/lintQuickfix/requiresApi/annotation.kt.as31 delete mode 100644 idea/testData/android/lintQuickfix/requiresApi/annotation.kt.expected delete mode 100644 idea/testData/android/lintQuickfix/requiresApi/annotation.kt.expected.173 delete mode 100644 idea/testData/android/lintQuickfix/requiresApi/annotation.kt.expected.as31 delete mode 100644 idea/testData/android/lintQuickfix/targetApi/annotation.kt delete mode 100644 idea/testData/android/lintQuickfix/targetApi/annotation.kt.173 delete mode 100644 idea/testData/android/lintQuickfix/targetApi/annotation.kt.as31 delete mode 100644 idea/testData/android/lintQuickfix/targetApi/annotation.kt.expected delete mode 100644 idea/testData/android/lintQuickfix/targetApi/annotation.kt.expected.173 delete mode 100644 idea/testData/android/lintQuickfix/targetApi/annotation.kt.expected.as31 diff --git a/idea/idea-android/tests/org/jetbrains/kotlin/android/quickfix/AndroidLintQuickfixTestGenerated.java b/idea/idea-android/tests/org/jetbrains/kotlin/android/quickfix/AndroidLintQuickfixTestGenerated.java index 90c52675aa5..c5863500a0c 100644 --- a/idea/idea-android/tests/org/jetbrains/kotlin/android/quickfix/AndroidLintQuickfixTestGenerated.java +++ b/idea/idea-android/tests/org/jetbrains/kotlin/android/quickfix/AndroidLintQuickfixTestGenerated.java @@ -87,11 +87,6 @@ public class AndroidLintQuickfixTestGenerated extends AbstractAndroidLintQuickfi KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/lintQuickfix/requiresApi"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("annotation.kt") - public void testAnnotation() throws Exception { - runTest("idea/testData/android/lintQuickfix/requiresApi/annotation.kt"); - } - @TestMetadata("companion.kt") public void testCompanion() throws Exception { runTest("idea/testData/android/lintQuickfix/requiresApi/companion.kt"); @@ -208,11 +203,6 @@ public class AndroidLintQuickfixTestGenerated extends AbstractAndroidLintQuickfi KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("idea/testData/android/lintQuickfix/targetApi"), Pattern.compile("^([\\w\\-_]+)\\.kt$"), TargetBackend.ANY, true); } - @TestMetadata("annotation.kt") - public void testAnnotation() throws Exception { - runTest("idea/testData/android/lintQuickfix/targetApi/annotation.kt"); - } - @TestMetadata("companion.kt") public void testCompanion() throws Exception { runTest("idea/testData/android/lintQuickfix/targetApi/companion.kt"); diff --git a/idea/testData/android/lintQuickfix/requiresApi/annotation.kt b/idea/testData/android/lintQuickfix/requiresApi/annotation.kt deleted file mode 100644 index 19b6ba7d86a..00000000000 --- a/idea/testData/android/lintQuickfix/requiresApi/annotation.kt +++ /dev/null @@ -1,12 +0,0 @@ -// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation -// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection -// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java - -import android.graphics.drawable.VectorDrawable -import kotlin.reflect.KClass - -annotation class SomeAnnotationWithClass(val cls: KClass<*>) - -@SomeAnnotationWithClass(VectorDrawable::class) -class VectorDrawableProvider { -} \ No newline at end of file diff --git a/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.173 b/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.173 deleted file mode 100644 index dbf09a01c09..00000000000 --- a/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.173 +++ /dev/null @@ -1,12 +0,0 @@ -// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation -// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection -// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java - -import android.graphics.drawable.VectorDrawable -import kotlin.reflect.KClass - -annotation class SomeAnnotationWithClass(val cls: KClass<*>) - -@SomeAnnotationWithClass(VectorDrawable::class) -class VectorDrawableProvider { -} \ No newline at end of file diff --git a/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.as31 b/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.as31 deleted file mode 100644 index 19b6ba7d86a..00000000000 --- a/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.as31 +++ /dev/null @@ -1,12 +0,0 @@ -// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation -// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection -// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java - -import android.graphics.drawable.VectorDrawable -import kotlin.reflect.KClass - -annotation class SomeAnnotationWithClass(val cls: KClass<*>) - -@SomeAnnotationWithClass(VectorDrawable::class) -class VectorDrawableProvider { -} \ No newline at end of file diff --git a/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.expected b/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.expected deleted file mode 100644 index dbc848be75d..00000000000 --- a/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.expected +++ /dev/null @@ -1,15 +0,0 @@ -// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation -// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection -// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java - -import android.graphics.drawable.VectorDrawable -import android.os.Build -import android.support.annotation.RequiresApi -import kotlin.reflect.KClass - -annotation class SomeAnnotationWithClass(val cls: KClass<*>) - -@RequiresApi(Build.VERSION_CODES.LOLLIPOP) -@SomeAnnotationWithClass(VectorDrawable::class) -class VectorDrawableProvider { -} \ No newline at end of file diff --git a/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.expected.173 b/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.expected.173 deleted file mode 100644 index 2db4b45bc3f..00000000000 --- a/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.expected.173 +++ /dev/null @@ -1,15 +0,0 @@ -// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation -// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection -// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java - -import android.graphics.drawable.VectorDrawable -import android.os.Build -import android.support.annotation.RequiresApi -import kotlin.reflect.KClass - -annotation class SomeAnnotationWithClass(val cls: KClass<*>) - -@RequiresApi(Build.VERSION_CODES.LOLLIPOP) -@SomeAnnotationWithClass(VectorDrawable::class) -class VectorDrawableProvider { -} \ No newline at end of file diff --git a/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.expected.as31 b/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.expected.as31 deleted file mode 100644 index dbc848be75d..00000000000 --- a/idea/testData/android/lintQuickfix/requiresApi/annotation.kt.expected.as31 +++ /dev/null @@ -1,15 +0,0 @@ -// INTENTION_TEXT: Add @RequiresApi(LOLLIPOP) Annotation -// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection -// DEPENDENCY: RequiresApi.java -> android/support/annotation/RequiresApi.java - -import android.graphics.drawable.VectorDrawable -import android.os.Build -import android.support.annotation.RequiresApi -import kotlin.reflect.KClass - -annotation class SomeAnnotationWithClass(val cls: KClass<*>) - -@RequiresApi(Build.VERSION_CODES.LOLLIPOP) -@SomeAnnotationWithClass(VectorDrawable::class) -class VectorDrawableProvider { -} \ No newline at end of file diff --git a/idea/testData/android/lintQuickfix/targetApi/annotation.kt b/idea/testData/android/lintQuickfix/targetApi/annotation.kt deleted file mode 100644 index e9431202f81..00000000000 --- a/idea/testData/android/lintQuickfix/targetApi/annotation.kt +++ /dev/null @@ -1,11 +0,0 @@ -// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation -// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection - -import android.graphics.drawable.VectorDrawable -import kotlin.reflect.KClass - -annotation class SomeAnnotationWithClass(val cls: KClass<*>) - -@SomeAnnotationWithClass(VectorDrawable::class) -class VectorDrawableProvider { -} \ No newline at end of file diff --git a/idea/testData/android/lintQuickfix/targetApi/annotation.kt.173 b/idea/testData/android/lintQuickfix/targetApi/annotation.kt.173 deleted file mode 100644 index f9f055359d7..00000000000 --- a/idea/testData/android/lintQuickfix/targetApi/annotation.kt.173 +++ /dev/null @@ -1,11 +0,0 @@ -// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation -// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection - -import android.graphics.drawable.VectorDrawable -import kotlin.reflect.KClass - -annotation class SomeAnnotationWithClass(val cls: KClass<*>) - -@SomeAnnotationWithClass(VectorDrawable::class) -class VectorDrawableProvider { -} \ No newline at end of file diff --git a/idea/testData/android/lintQuickfix/targetApi/annotation.kt.as31 b/idea/testData/android/lintQuickfix/targetApi/annotation.kt.as31 deleted file mode 100644 index e9431202f81..00000000000 --- a/idea/testData/android/lintQuickfix/targetApi/annotation.kt.as31 +++ /dev/null @@ -1,11 +0,0 @@ -// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation -// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection - -import android.graphics.drawable.VectorDrawable -import kotlin.reflect.KClass - -annotation class SomeAnnotationWithClass(val cls: KClass<*>) - -@SomeAnnotationWithClass(VectorDrawable::class) -class VectorDrawableProvider { -} \ No newline at end of file diff --git a/idea/testData/android/lintQuickfix/targetApi/annotation.kt.expected b/idea/testData/android/lintQuickfix/targetApi/annotation.kt.expected deleted file mode 100644 index 0a51e121500..00000000000 --- a/idea/testData/android/lintQuickfix/targetApi/annotation.kt.expected +++ /dev/null @@ -1,14 +0,0 @@ -// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation -// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection - -import android.annotation.TargetApi -import android.graphics.drawable.VectorDrawable -import android.os.Build -import kotlin.reflect.KClass - -annotation class SomeAnnotationWithClass(val cls: KClass<*>) - -@TargetApi(Build.VERSION_CODES.LOLLIPOP) -@SomeAnnotationWithClass(VectorDrawable::class) -class VectorDrawableProvider { -} \ No newline at end of file diff --git a/idea/testData/android/lintQuickfix/targetApi/annotation.kt.expected.173 b/idea/testData/android/lintQuickfix/targetApi/annotation.kt.expected.173 deleted file mode 100644 index 738d2a571d1..00000000000 --- a/idea/testData/android/lintQuickfix/targetApi/annotation.kt.expected.173 +++ /dev/null @@ -1,14 +0,0 @@ -// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation -// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintNewApiInspection - -import android.annotation.TargetApi -import android.graphics.drawable.VectorDrawable -import android.os.Build -import kotlin.reflect.KClass - -annotation class SomeAnnotationWithClass(val cls: KClass<*>) - -@TargetApi(Build.VERSION_CODES.LOLLIPOP) -@SomeAnnotationWithClass(VectorDrawable::class) -class VectorDrawableProvider { -} \ No newline at end of file diff --git a/idea/testData/android/lintQuickfix/targetApi/annotation.kt.expected.as31 b/idea/testData/android/lintQuickfix/targetApi/annotation.kt.expected.as31 deleted file mode 100644 index 0a51e121500..00000000000 --- a/idea/testData/android/lintQuickfix/targetApi/annotation.kt.expected.as31 +++ /dev/null @@ -1,14 +0,0 @@ -// INTENTION_TEXT: Add @TargetApi(LOLLIPOP) Annotation -// INSPECTION_CLASS: com.android.tools.idea.lint.AndroidLintNewApiInspection - -import android.annotation.TargetApi -import android.graphics.drawable.VectorDrawable -import android.os.Build -import kotlin.reflect.KClass - -annotation class SomeAnnotationWithClass(val cls: KClass<*>) - -@TargetApi(Build.VERSION_CODES.LOLLIPOP) -@SomeAnnotationWithClass(VectorDrawable::class) -class VectorDrawableProvider { -} \ No newline at end of file