From 5ce692a75c0c2eadcff89fa21b49686e8690613e Mon Sep 17 00:00:00 2001 From: Alexey Tsvetkov Date: Fri, 15 Jan 2016 15:32:23 +0300 Subject: [PATCH] Improve proto comparison test with changes of annotation list --- .../ProtoComparisonTestGenerated.java | 12 +++++------ .../classAnnotationListChanged/new.kt | 20 +++++++++++++++++++ .../classAnnotationListChanged/old.kt | 20 +++++++++++++++++++ .../classAnnotationListChanged/result.out | 7 +++++++ .../new.kt | 5 ----- .../old.kt | 4 ---- .../result.out | 1 - 7 files changed, 53 insertions(+), 16 deletions(-) create mode 100644 jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/new.kt create mode 100644 jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/old.kt create mode 100644 jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/result.out delete mode 100644 jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/new.kt delete mode 100644 jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/old.kt delete mode 100644 jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/result.out diff --git a/jps-plugin/test/org/jetbrains/kotlin/jps/incremental/ProtoComparisonTestGenerated.java b/jps-plugin/test/org/jetbrains/kotlin/jps/incremental/ProtoComparisonTestGenerated.java index 2b557376bb9..4269b47f0ac 100644 --- a/jps-plugin/test/org/jetbrains/kotlin/jps/incremental/ProtoComparisonTestGenerated.java +++ b/jps-plugin/test/org/jetbrains/kotlin/jps/incremental/ProtoComparisonTestGenerated.java @@ -37,6 +37,12 @@ public class ProtoComparisonTestGenerated extends AbstractProtoComparisonTest { KotlinTestUtils.assertAllTestsPresentByMetadata(this.getClass(), new File("jps-plugin/testData/comparison/classSignatureChange"), Pattern.compile("^([^\\.]+)$"), true); } + @TestMetadata("classAnnotationListChanged") + public void testClassAnnotationListChanged() throws Exception { + String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/"); + doTest(fileName); + } + @TestMetadata("classFlagsAndMembersChanged") public void testClassFlagsAndMembersChanged() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classFlagsAndMembersChanged/"); @@ -61,12 +67,6 @@ public class ProtoComparisonTestGenerated extends AbstractProtoComparisonTest { doTest(fileName); } - @TestMetadata("classWithClassAnnotationListChanged") - public void testClassWithClassAnnotationListChanged() throws Exception { - String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/"); - doTest(fileName); - } - @TestMetadata("classWithSuperTypeListChanged") public void testClassWithSuperTypeListChanged() throws Exception { String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classSignatureChange/classWithSuperTypeListChanged/"); diff --git a/jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/new.kt b/jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/new.kt new file mode 100644 index 00000000000..fc7bee7454c --- /dev/null +++ b/jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/new.kt @@ -0,0 +1,20 @@ +package test + +annotation class Ann1 +annotation class Ann2 + +@Ann1 +@Ann2 +class AnnotationListBecomeNotEmpty + +class AnnotationListBecomeEmpty + +@Ann1 +@Ann2 +class AnnotationAdded + +@Ann1 +class AnnotationRemoved + +@Ann2 +class AnnotationReplaced diff --git a/jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/old.kt b/jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/old.kt new file mode 100644 index 00000000000..517cdb5d01a --- /dev/null +++ b/jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/old.kt @@ -0,0 +1,20 @@ +package test + +annotation class Ann1 +annotation class Ann2 + +class AnnotationListBecomeNotEmpty + +@Ann1 +@Ann2 +class AnnotationListBecomeEmpty + +@Ann1 +class AnnotationAdded + +@Ann1 +@Ann2 +class AnnotationRemoved + +@Ann1 +class AnnotationReplaced diff --git a/jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/result.out b/jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/result.out new file mode 100644 index 00000000000..34b8db80090 --- /dev/null +++ b/jps-plugin/testData/comparison/classSignatureChange/classAnnotationListChanged/result.out @@ -0,0 +1,7 @@ +changes in test/Ann1: NONE +changes in test/Ann2: NONE +changes in test/AnnotationAdded: NONE +changes in test/AnnotationListBecomeEmpty: CLASS_SIGNATURE +changes in test/AnnotationListBecomeNotEmpty: CLASS_SIGNATURE +changes in test/AnnotationRemoved: NONE +changes in test/AnnotationReplaced: NONE diff --git a/jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/new.kt b/jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/new.kt deleted file mode 100644 index 7f1d546bb5c..00000000000 --- a/jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/new.kt +++ /dev/null @@ -1,5 +0,0 @@ -package test - -import kotlin.annotation.* - -annotation class ClassWithClassAnnotationListChanged diff --git a/jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/old.kt b/jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/old.kt deleted file mode 100644 index d7c7cb077d4..00000000000 --- a/jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/old.kt +++ /dev/null @@ -1,4 +0,0 @@ -package test - -@Deprecated("") class ClassWithClassAnnotationListChanged - diff --git a/jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/result.out b/jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/result.out deleted file mode 100644 index d447c5da3f9..00000000000 --- a/jps-plugin/testData/comparison/classSignatureChange/classWithClassAnnotationListChanged/result.out +++ /dev/null @@ -1 +0,0 @@ -changes in test/ClassWithClassAnnotationListChanged: CLASS_SIGNATURE