Improve proto comparison test with changes of annotation list

This commit is contained in:
Alexey Tsvetkov
2016-01-15 15:32:23 +03:00
parent 58a91b3d20
commit 5ce692a75c
7 changed files with 53 additions and 16 deletions
@@ -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/");
@@ -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
@@ -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
@@ -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
@@ -1,5 +0,0 @@
package test
import kotlin.annotation.*
annotation class ClassWithClassAnnotationListChanged
@@ -1,4 +0,0 @@
package test
@Deprecated("") class ClassWithClassAnnotationListChanged
@@ -1 +0,0 @@
changes in test/ClassWithClassAnnotationListChanged: CLASS_SIGNATURE