Minor tweak to proto test data format

This commit is contained in:
Alexey Tsvetkov
2017-06-16 18:03:30 +03:00
parent 1921950a1b
commit 8ffd141d17
29 changed files with 130 additions and 131 deletions
@@ -40,18 +40,18 @@ abstract class AbstractProtoComparisonTest<PROTO_DATA> : UsefulTestCase() {
val p = Printer(sb)
(oldClassMap.keys - newClassMap.keys).sortedBy { it.toString() }.forEach { classId ->
p.println("REMOVED: class $classId")
p.println("REMOVED $classId")
}
(newClassMap.keys - oldClassMap.keys).sortedBy { it.toString() }.forEach { classId ->
p.println("ADDED: class $classId")
p.println("ADDED $classId")
}
(oldClassMap.keys.intersect(newClassMap.keys)).sortedBy { it.toString() }.forEach { classId ->
val diff = difference(oldClassMap[classId]!!, newClassMap[classId]!!)
if (diff == null) {
p.println("skip $classId")
p.println("SKIPPED $classId")
return@forEach
}
@@ -66,7 +66,7 @@ abstract class AbstractProtoComparisonTest<PROTO_DATA> : UsefulTestCase() {
changes.add("NONE")
}
p.println("changes in $classId: ${changes.joinToString()}")
p.println("CHANGES in $classId: ${changes.joinToString()}")
}
KotlinTestUtils.assertEqualsToFile(File(testDataPath + File.separator + "result.out"), sb.toString())
@@ -1,12 +1,12 @@
REMOVED: class test/ClassWithChangedCompanionObject.FirstName
REMOVED: class test/ClassWithRemovedCompanionObject.Companion
ADDED: class test/ClassWithAddedCompanionObject.Companion
ADDED: class test/ClassWithChangedCompanionObject.SecondName
changes in test/ClassWithAddedCompanionObject: CLASS_SIGNATURE, MEMBERS
REMOVED test/ClassWithChangedCompanionObject.FirstName
REMOVED test/ClassWithRemovedCompanionObject.Companion
ADDED test/ClassWithAddedCompanionObject.Companion
ADDED test/ClassWithChangedCompanionObject.SecondName
CHANGES in test/ClassWithAddedCompanionObject: CLASS_SIGNATURE, MEMBERS
[Companion]
changes in test/ClassWithChangedCompanionObject: CLASS_SIGNATURE, MEMBERS
CHANGES in test/ClassWithChangedCompanionObject: CLASS_SIGNATURE, MEMBERS
[FirstName, SecondName]
changes in test/ClassWithChangedVisibilityForCompanionObject: NONE
changes in test/ClassWithChangedVisibilityForCompanionObject.Companion: CLASS_SIGNATURE
changes in test/ClassWithRemovedCompanionObject: CLASS_SIGNATURE, MEMBERS
CHANGES in test/ClassWithChangedVisibilityForCompanionObject: NONE
CHANGES in test/ClassWithChangedVisibilityForCompanionObject.Companion: CLASS_SIGNATURE
CHANGES in test/ClassWithRemovedCompanionObject: CLASS_SIGNATURE, MEMBERS
[Companion]
@@ -1,5 +1,5 @@
changes in test/ClassWithPrimaryConstructorChanged: CLASS_SIGNATURE
changes in test/ClassWithPrimaryConstructorVisibilityChanged: CLASS_SIGNATURE
changes in test/ClassWithSecondaryConstructorVisibilityChanged: CLASS_SIGNATURE
changes in test/ClassWithSecondaryConstructorsAdded: CLASS_SIGNATURE
changes in test/ClassWithSecondaryConstructorsRemoved: CLASS_SIGNATURE
CHANGES in test/ClassWithPrimaryConstructorChanged: CLASS_SIGNATURE
CHANGES in test/ClassWithPrimaryConstructorVisibilityChanged: CLASS_SIGNATURE
CHANGES in test/ClassWithSecondaryConstructorVisibilityChanged: CLASS_SIGNATURE
CHANGES in test/ClassWithSecondaryConstructorsAdded: CLASS_SIGNATURE
CHANGES in test/ClassWithSecondaryConstructorsRemoved: CLASS_SIGNATURE
@@ -1,12 +1,12 @@
changes in test/ClassWithChangedVisiblityForFun1: MEMBERS
CHANGES in test/ClassWithChangedVisiblityForFun1: MEMBERS
[foo]
changes in test/ClassWithChangedVisiblityForFun2: MEMBERS
CHANGES in test/ClassWithChangedVisiblityForFun2: MEMBERS
[foo]
changes in test/ClassWithFunAdded: MEMBERS
CHANGES in test/ClassWithFunAdded: MEMBERS
[added]
changes in test/ClassWithFunRemoved: MEMBERS
CHANGES in test/ClassWithFunRemoved: MEMBERS
[removed]
changes in test/ClassWithValAndFunAddedAndRemoved: MEMBERS
CHANGES in test/ClassWithValAndFunAddedAndRemoved: MEMBERS
[funAdded, funRemoved, valAdded, valRemoved]
changes in test/ClassWithValConvertedToVar: MEMBERS
CHANGES in test/ClassWithValConvertedToVar: MEMBERS
[value]
@@ -1,9 +1,9 @@
REMOVED: class test/ClassWithNestedClasses.NestedClassRemoved
ADDED: class test/ClassWithNestedClasses.InnerClassAdded
ADDED: class test/ClassWithNestedClasses.NestedClassAdded
changes in test/ClassWithChangedVisibilityForNestedClasses: NONE
changes in test/ClassWithChangedVisibilityForNestedClasses.InnerClass: CLASS_SIGNATURE
changes in test/ClassWithChangedVisibilityForNestedClasses.NestedClass: CLASS_SIGNATURE
changes in test/ClassWithNestedClasses: MEMBERS
REMOVED test/ClassWithNestedClasses.NestedClassRemoved
ADDED test/ClassWithNestedClasses.InnerClassAdded
ADDED test/ClassWithNestedClasses.NestedClassAdded
CHANGES in test/ClassWithChangedVisibilityForNestedClasses: NONE
CHANGES in test/ClassWithChangedVisibilityForNestedClasses.InnerClass: CLASS_SIGNATURE
CHANGES in test/ClassWithChangedVisibilityForNestedClasses.NestedClass: CLASS_SIGNATURE
CHANGES in test/ClassWithNestedClasses: MEMBERS
[InnerClassAdded, NestedClassAdded, NestedClassRemoved]
changes in test/ClassWithNestedClasses.InnerClass: NONE
CHANGES in test/ClassWithNestedClasses.InnerClass: NONE
@@ -1 +1 @@
changes in test/EnumClassWithChanges: CLASS_SIGNATURE
CHANGES in test/EnumClassWithChanges: CLASS_SIGNATURE
@@ -1,7 +1,7 @@
changes in test/A: MEMBERS
CHANGES in test/A: MEMBERS
[argumentAdded, argumentRemoved, valueAdded, valueRemoved]
changes in test/ConstructorArgumentAdded: CLASS_SIGNATURE
changes in test/ConstructorArgumentRemoved: CLASS_SIGNATURE
changes in test/ConstructorValueAdded: CLASS_SIGNATURE
changes in test/ConstructorValueChanged: NONE
changes in test/ConstructorValueRemoved: CLASS_SIGNATURE
CHANGES in test/ConstructorArgumentAdded: CLASS_SIGNATURE
CHANGES in test/ConstructorArgumentRemoved: CLASS_SIGNATURE
CHANGES in test/ConstructorValueAdded: CLASS_SIGNATURE
CHANGES in test/ConstructorValueChanged: NONE
CHANGES in test/ConstructorValueRemoved: CLASS_SIGNATURE
@@ -1,4 +1,4 @@
changes in test/A: MEMBERS
CHANGES in test/A: MEMBERS
[abstractFlagAddedFun, abstractFlagAddedVal, abstractFlagRemovedFun, abstractFlagRemovedVal, infixFlagAddedFun, infixFlagRemovedFun, inlineFlagAddedFun, inlineFlagRemovedFun, internalFlagAddedFun, internalFlagAddedVal, internalFlagRemovedFun, internalFlagRemovedVal, lateinitFlagAddedVal, lateinitFlagRemovedVal, openFlagAddedFun, openFlagAddedVal, openFlagRemovedFun, openFlagRemovedVal, operatorFlagAddedFun, operatorFlagRemovedFun, privateFlagAddedFun, privateFlagAddedVal, privateFlagRemovedFun, privateFlagRemovedVal, protectedFlagAddedFun, protectedFlagAddedVal, protectedFlagRemovedFun, protectedFlagRemovedVal, tailrecFlagAddedFun, tailrecFlagRemovedFun]
changes in test/O: MEMBERS
CHANGES in test/O: MEMBERS
[constFlagAddedVal, constFlagRemovedVal]
@@ -1,5 +1,5 @@
ADDED: class test/Base.C
changes in test/Base: CLASS_SIGNATURE, MEMBERS
ADDED test/Base.C
CHANGES in test/Base: CLASS_SIGNATURE, MEMBERS
[C]
changes in test/Base.A: NONE
changes in test/Base.B: NONE
CHANGES in test/Base.A: NONE
CHANGES in test/Base.B: NONE
@@ -1,3 +1,3 @@
changes in test/ClassWithPrivateFunAdded: NONE
changes in test/ClassWithPrivateFunRemoved: NONE
changes in test/ClassWithPrivateFunSignatureChanged: NONE
CHANGES in test/ClassWithPrivateFunAdded: NONE
CHANGES in test/ClassWithPrivateFunRemoved: NONE
CHANGES in test/ClassWithPrivateFunSignatureChanged: NONE
@@ -1,3 +1,3 @@
changes in test/ClassWithPrivatePrimaryConstructorAdded: NONE
changes in test/ClassWithPrivatePrimaryConstructorChanged: NONE
changes in test/ClassWithPrivatePrimaryConstructorRemoved: NONE
CHANGES in test/ClassWithPrivatePrimaryConstructorAdded: NONE
CHANGES in test/ClassWithPrivatePrimaryConstructorChanged: NONE
CHANGES in test/ClassWithPrivatePrimaryConstructorRemoved: NONE
@@ -1,3 +1,3 @@
changes in test/ClassWithPrivateSecondaryConstructorsAdded: NONE
changes in test/ClassWithPrivateSecondaryConstructorsAdded2: NONE
changes in test/ClassWithPrivateSecondaryConstructorsRemoved: NONE
CHANGES in test/ClassWithPrivateSecondaryConstructorsAdded: NONE
CHANGES in test/ClassWithPrivateSecondaryConstructorsAdded2: NONE
CHANGES in test/ClassWithPrivateSecondaryConstructorsRemoved: NONE
@@ -1,4 +1,4 @@
changes in test/ClassWithGetterForPrivateValChanged: NONE
changes in test/ClassWithPrivateValAdded: NONE
changes in test/ClassWithPrivateValRemoved: NONE
changes in test/ClassWithPrivateValSignatureChanged: NONE
CHANGES in test/ClassWithGetterForPrivateValChanged: NONE
CHANGES in test/ClassWithPrivateValAdded: NONE
CHANGES in test/ClassWithPrivateValRemoved: NONE
CHANGES in test/ClassWithPrivateValSignatureChanged: NONE
@@ -1,4 +1,4 @@
changes in test/ClassWithGetterAndSetterForPrivateVarChanged: NONE
changes in test/ClassWithPrivateVarAdded: NONE
changes in test/ClassWithPrivateVarRemoved: NONE
changes in test/ClassWithPrivateVarSignatureChanged: NONE
CHANGES in test/ClassWithGetterAndSetterForPrivateVarChanged: NONE
CHANGES in test/ClassWithPrivateVarAdded: NONE
CHANGES in test/ClassWithPrivateVarRemoved: NONE
CHANGES in test/ClassWithPrivateVarSignatureChanged: NONE
@@ -1,7 +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
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,2 +1,2 @@
changes in test/A: CLASS_SIGNATURE, MEMBERS
CHANGES in test/A: CLASS_SIGNATURE, MEMBERS
[f]
@@ -1,41 +1,41 @@
changes in test/AbstractFlagAdded: CLASS_SIGNATURE
changes in test/AbstractFlagRemoved: CLASS_SIGNATURE
changes in test/AbstractFlagUnchanged: NONE
changes in test/AnnotationFlagAdded: CLASS_SIGNATURE
changes in test/AnnotationFlagRemoved: CLASS_SIGNATURE
changes in test/AnnotationFlagUnchanged: NONE
changes in test/DataFlagAdded: CLASS_SIGNATURE, MEMBERS
CHANGES in test/AbstractFlagAdded: CLASS_SIGNATURE
CHANGES in test/AbstractFlagRemoved: CLASS_SIGNATURE
CHANGES in test/AbstractFlagUnchanged: NONE
CHANGES in test/AnnotationFlagAdded: CLASS_SIGNATURE
CHANGES in test/AnnotationFlagRemoved: CLASS_SIGNATURE
CHANGES in test/AnnotationFlagUnchanged: NONE
CHANGES in test/DataFlagAdded: CLASS_SIGNATURE, MEMBERS
[component1, copy, equals, hashCode, toString]
changes in test/DataFlagRemoved: CLASS_SIGNATURE, MEMBERS
CHANGES in test/DataFlagRemoved: CLASS_SIGNATURE, MEMBERS
[component1, copy, equals, hashCode, toString]
changes in test/DataFlagUnchanged: NONE
changes in test/EnumFlagAdded: CLASS_SIGNATURE
changes in test/EnumFlagRemoved: CLASS_SIGNATURE
changes in test/EnumFlagUnchanged: NONE
changes in test/FinalFlagAdded: NONE
changes in test/FinalFlagRemoved: NONE
changes in test/FinalFlagUnchanged: NONE
changes in test/InnerClassHolder: NONE
changes in test/InnerClassHolder.InnerFlagAdded: CLASS_SIGNATURE
changes in test/InnerClassHolder.InnerFlagRemoved: CLASS_SIGNATURE
changes in test/InnerClassHolder.InnerFlagUnchanged: NONE
changes in test/InternalFlagAdded: CLASS_SIGNATURE
changes in test/InternalFlagRemoved: CLASS_SIGNATURE
changes in test/InternalFlagUnchanged: NONE
changes in test/OpenFlagAdded: CLASS_SIGNATURE
changes in test/OpenFlagRemoved: CLASS_SIGNATURE
changes in test/OpenFlagUnchanged: NONE
changes in test/PrivateFlagAdded: CLASS_SIGNATURE
changes in test/PrivateFlagRemoved: CLASS_SIGNATURE
changes in test/PrivateFlagUnchanged: NONE
changes in test/ProtectedClassHolder: NONE
changes in test/ProtectedClassHolder.ProtectedFlagAdded: CLASS_SIGNATURE
changes in test/ProtectedClassHolder.ProtectedFlagRemoved: CLASS_SIGNATURE
changes in test/ProtectedClassHolder.ProtectedFlagUnchanged: NONE
changes in test/PublicFlagAdded: NONE
changes in test/PublicFlagRemoved: NONE
changes in test/PublicFlagUnchanged: NONE
changes in test/SealedFlagAdded: CLASS_SIGNATURE
changes in test/SealedFlagRemoved: CLASS_SIGNATURE
changes in test/SealedFlagUnchanged: NONE
changes in test/UnchangedNoFlags: NONE
CHANGES in test/DataFlagUnchanged: NONE
CHANGES in test/EnumFlagAdded: CLASS_SIGNATURE
CHANGES in test/EnumFlagRemoved: CLASS_SIGNATURE
CHANGES in test/EnumFlagUnchanged: NONE
CHANGES in test/FinalFlagAdded: NONE
CHANGES in test/FinalFlagRemoved: NONE
CHANGES in test/FinalFlagUnchanged: NONE
CHANGES in test/InnerClassHolder: NONE
CHANGES in test/InnerClassHolder.InnerFlagAdded: CLASS_SIGNATURE
CHANGES in test/InnerClassHolder.InnerFlagRemoved: CLASS_SIGNATURE
CHANGES in test/InnerClassHolder.InnerFlagUnchanged: NONE
CHANGES in test/InternalFlagAdded: CLASS_SIGNATURE
CHANGES in test/InternalFlagRemoved: CLASS_SIGNATURE
CHANGES in test/InternalFlagUnchanged: NONE
CHANGES in test/OpenFlagAdded: CLASS_SIGNATURE
CHANGES in test/OpenFlagRemoved: CLASS_SIGNATURE
CHANGES in test/OpenFlagUnchanged: NONE
CHANGES in test/PrivateFlagAdded: CLASS_SIGNATURE
CHANGES in test/PrivateFlagRemoved: CLASS_SIGNATURE
CHANGES in test/PrivateFlagUnchanged: NONE
CHANGES in test/ProtectedClassHolder: NONE
CHANGES in test/ProtectedClassHolder.ProtectedFlagAdded: CLASS_SIGNATURE
CHANGES in test/ProtectedClassHolder.ProtectedFlagRemoved: CLASS_SIGNATURE
CHANGES in test/ProtectedClassHolder.ProtectedFlagUnchanged: NONE
CHANGES in test/PublicFlagAdded: NONE
CHANGES in test/PublicFlagRemoved: NONE
CHANGES in test/PublicFlagUnchanged: NONE
CHANGES in test/SealedFlagAdded: CLASS_SIGNATURE
CHANGES in test/SealedFlagRemoved: CLASS_SIGNATURE
CHANGES in test/SealedFlagUnchanged: NONE
CHANGES in test/UnchangedNoFlags: NONE
@@ -1 +1 @@
changes in test/ClassWithTypeParameterListChanged: CLASS_SIGNATURE
CHANGES in test/ClassWithTypeParameterListChanged: CLASS_SIGNATURE
@@ -1 +1 @@
changes in test/ClassWithSuperTypeListChanged: CLASS_SIGNATURE
CHANGES in test/ClassWithSuperTypeListChanged: CLASS_SIGNATURE
@@ -1,3 +1,3 @@
REMOVED: class test/MainKt.Companion
REMOVED: class test/TestPackage
changes in test/MainKt: CLASS_SIGNATURE
REMOVED test/MainKt.Companion
REMOVED test/TestPackage
CHANGES in test/MainKt: CLASS_SIGNATURE
@@ -1,3 +1,2 @@
changes in test/A: MEMBERS
CHANGES in test/A: MEMBERS
[externalFlagAddedFun, externalFlagRemovedFun]
@@ -1,4 +1,4 @@
skip test/Utils
changes in test/Utils__Main1Kt: MEMBERS
SKIPPED test/Utils
CHANGES in test/Utils__Main1Kt: MEMBERS
[publicAddedFun1]
changes in test/Utils__Main2Kt: NONE
CHANGES in test/Utils__Main2Kt: NONE
@@ -1,3 +1,3 @@
ADDED: class test/MainKt.Companion
ADDED: class test/TestPackage
changes in test/MainKt: CLASS_SIGNATURE
ADDED test/MainKt.Companion
ADDED test/TestPackage
CHANGES in test/MainKt: CLASS_SIGNATURE
@@ -1,2 +1,2 @@
changes in test/MainKt: MEMBERS
CHANGES in test/MainKt: MEMBERS
[argumentAdded, argumentRemoved, valueAdded, valueRemoved]
@@ -1,2 +1,2 @@
changes in test/MainKt: MEMBERS
CHANGES in test/MainKt: MEMBERS
[constFlagAddedVal, constFlagRemovedVal, externalFlagAddedFun, externalFlagRemovedFun, infixFlagAddedFun, infixFlagRemovedFun, inlineFlagAddedFun, inlineFlagRemovedFun, internalFlagAddedFun, internalFlagAddedVal, internalFlagRemovedFun, internalFlagRemovedVal, operatorFlagAddedFun, operatorFlagRemovedFun, privateFlagAddedFun, privateFlagAddedVal, privateFlagRemovedFun, privateFlagRemovedVal, tailrecFlagAddedFun, tailrecFlagRemovedFun]
@@ -1 +1 @@
changes in test/MainKt: NONE
CHANGES in test/MainKt: NONE
@@ -1,2 +1,2 @@
changes in test/MainKt: MEMBERS
CHANGES in test/MainKt: MEMBERS
[addedFun, addedVal, changedFun, changedVal, removedFun, removedVal]
@@ -1,4 +1,4 @@
changes in test/UnchangedClass: NONE
changes in test/UnchangedClassWithFunOnly: NONE
changes in test/UnchangedClassWithValOnly: NONE
changes in test/UnchangedClassWithVarOnly: NONE
CHANGES in test/UnchangedClass: NONE
CHANGES in test/UnchangedClassWithFunOnly: NONE
CHANGES in test/UnchangedClassWithValOnly: NONE
CHANGES in test/UnchangedClassWithVarOnly: NONE
@@ -1 +1 @@
changes in test/MainKt: NONE
CHANGES in test/MainKt: NONE