Add proto comparison tests where members annotations are changed

Original commit: 0d3b882852
This commit is contained in:
Alexey Tsvetkov
2017-08-09 23:15:51 +03:00
parent 6c03741ed3
commit d36907bc8f
10 changed files with 124 additions and 0 deletions
@@ -188,6 +188,12 @@ public class JsProtoComparisonTestGenerated extends AbstractJsProtoComparisonTes
doTest(fileName);
}
@TestMetadata("membersAnnotationListChanged")
public void testMembersAnnotationListChanged() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/membersAnnotationListChanged/");
doTest(fileName);
}
@TestMetadata("membersFlagsChanged")
public void testMembersFlagsChanged() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/membersFlagsChanged/");
@@ -221,6 +227,12 @@ public class JsProtoComparisonTestGenerated extends AbstractJsProtoComparisonTes
doTest(fileName);
}
@TestMetadata("membersAnnotationListChanged")
public void testMembersAnnotationListChanged() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/membersAnnotationListChanged/");
doTest(fileName);
}
@TestMetadata("membersFlagsChanged")
public void testMembersFlagsChanged() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/membersFlagsChanged/");
@@ -188,6 +188,12 @@ public class JvmProtoComparisonTestGenerated extends AbstractJvmProtoComparisonT
doTest(fileName);
}
@TestMetadata("membersAnnotationListChanged")
public void testMembersAnnotationListChanged() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/membersAnnotationListChanged/");
doTest(fileName);
}
@TestMetadata("membersFlagsChanged")
public void testMembersFlagsChanged() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/classMembersOnlyChanged/membersFlagsChanged/");
@@ -221,6 +227,12 @@ public class JvmProtoComparisonTestGenerated extends AbstractJvmProtoComparisonT
doTest(fileName);
}
@TestMetadata("membersAnnotationListChanged")
public void testMembersAnnotationListChanged() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/membersAnnotationListChanged/");
doTest(fileName);
}
@TestMetadata("membersFlagsChanged")
public void testMembersFlagsChanged() throws Exception {
String fileName = KotlinTestUtils.navigationMetadata("jps-plugin/testData/comparison/packageMembers/membersFlagsChanged/");
@@ -0,0 +1,22 @@
package test
annotation class Ann1
annotation class Ann2
class A {
@Ann1
@Ann2
fun annotationListBecameNotEmpty() {}
fun annotationListBecameEmpty() {}
@Ann1
@Ann2
fun annotationAdded() {}
@Ann1
fun annotationRemoved() {}
@Ann2
fun annotationReplaced() {}
}
@@ -0,0 +1,26 @@
package test
annotation class Ann1
annotation class Ann2
class A {
fun annotationListBecameNotEmpty() {}
@Ann1
@Ann2
fun annotationListBecameEmpty() {
}
@Ann1
fun annotationAdded() {
}
@Ann1
@Ann2
fun annotationRemoved() {
}
@Ann1
fun annotationReplaced() {
}
}
@@ -0,0 +1,3 @@
PROTO DIFFERENCE in test/A: FUNCTION_LIST
CHANGES in test/A: MEMBERS
[annotationAdded, annotationListBecameEmpty, annotationListBecameNotEmpty, annotationRemoved, annotationReplaced]
@@ -0,0 +1,3 @@
PROTO DIFFERENCE in test/A: FUNCTION_LIST
CHANGES in test/A: MEMBERS
[annotationListBecameEmpty, annotationListBecameNotEmpty]
@@ -0,0 +1,20 @@
package test
annotation class Ann1
annotation class Ann2
@Ann1
@Ann2
fun annotationListBecameNotEmpty() {}
fun annotationListBecameEmpty() {}
@Ann1
@Ann2
fun annotationAdded() {}
@Ann1
fun annotationRemoved() {}
@Ann2
fun annotationReplaced() {}
@@ -0,0 +1,20 @@
package test
annotation class Ann1
annotation class Ann2
fun annotationListBecameNotEmpty() {}
@Ann1
@Ann2
fun annotationListBecameEmpty() {}
@Ann1
fun annotationAdded() {}
@Ann1
@Ann2
fun annotationRemoved() {}
@Ann1
fun annotationReplaced() {}
@@ -0,0 +1,3 @@
PROTO DIFFERENCE in test/MainKt: FUNCTION_LIST
CHANGES in test/MainKt: MEMBERS
[annotationAdded, annotationListBecameEmpty, annotationListBecameNotEmpty, annotationRemoved, annotationReplaced]
@@ -0,0 +1,3 @@
PROTO DIFFERENCE in test/MainKt: FUNCTION_LIST
CHANGES in test/MainKt: MEMBERS
[annotationListBecameEmpty, annotationListBecameNotEmpty]