-
-
Notifications
You must be signed in to change notification settings - Fork 361
test: migrate GenericsTest to JUnit 5 #4525
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
monperrus
merged 1 commit into
INRIA:master
from
MartinWitt:refactor/junit5/GenericsTest
Jan 17, 2022
Merged
test: migrate GenericsTest to JUnit 5 #4525
monperrus
merged 1 commit into
INRIA:master
from
MartinWitt:refactor/junit5/GenericsTest
Jan 17, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The following has changed in the code: Replaced junit 4 test annotation with junit 5 test annotation in testBugComparableComparator Replaced junit 4 test annotation with junit 5 test annotation in testModelBuildingTree Replaced junit 4 test annotation with junit 5 test annotation in testModelBuildingGenericConstructor Replaced junit 4 test annotation with junit 5 test annotation in testDiamond2 Replaced junit 4 test annotation with junit 5 test annotation in testDiamond1 Replaced junit 4 test annotation with junit 5 test annotation in testModelBuildingSimilarSignatureMethods Replaced junit 4 test annotation with junit 5 test annotation in testTypeParameterReference Replaced junit 4 test annotation with junit 5 test annotation in testTypeParameterDeclarer Replaced junit 4 test annotation with junit 5 test annotation in testGenericMethodCallWithExtend Replaced junit 4 test annotation with junit 5 test annotation in testBugCommonCollection Replaced junit 4 test annotation with junit 5 test annotation in testRecursiveUpperBound Replaced junit 4 test annotation with junit 5 test annotation in testInstanceOfMapEntryGeneric Replaced junit 4 test annotation with junit 5 test annotation in testAccessToGenerics Replaced junit 4 test annotation with junit 5 test annotation in testConstructorCallGenerics Replaced junit 4 test annotation with junit 5 test annotation in testInvocationGenerics Replaced junit 4 test annotation with junit 5 test annotation in testNewClassGenerics Replaced junit 4 test annotation with junit 5 test annotation in testMethodsWithGenericsWhoExtendsObject Replaced junit 4 test annotation with junit 5 test annotation in testName Replaced junit 4 test annotation with junit 5 test annotation in testGenericWithExtendsInDeclaration Replaced junit 4 test annotation with junit 5 test annotation in testGenericInField Replaced junit 4 test annotation with junit 5 test annotation in testGenericsInQualifiedNameInConstructorCall Replaced junit 4 test annotation with junit 5 test annotation in testGenericsOnLocalType Replaced junit 4 test annotation with junit 5 test annotation in testGenericsInConstructorCall Replaced junit 4 test annotation with junit 5 test annotation in testWildcard Replaced junit 4 test annotation with junit 5 test annotation in testGetDeclarationOnGenericReturnType Replaced junit 4 test annotation with junit 5 test annotation in testDeclarationOfTypeParameterReference Replaced junit 4 test annotation with junit 5 test annotation in testIsGenericsMethod Replaced junit 4 test annotation with junit 5 test annotation in testTypeParameterReferenceAsActualTypeArgument Replaced junit 4 test annotation with junit 5 test annotation in testGenericTypeReference Replaced junit 4 test annotation with junit 5 test annotation in testisGeneric Replaced junit 4 test annotation with junit 5 test annotation in testCtTypeReference_getSuperclass Replaced junit 4 test annotation with junit 5 test annotation in testTypeAdapted Replaced junit 4 test annotation with junit 5 test annotation in testClassTypingContext Replaced junit 4 test annotation with junit 5 test annotation in testRecursiveTypeAdapting Replaced junit 4 test annotation with junit 5 test annotation in testMethodTypingContext Replaced junit 4 test annotation with junit 5 test annotation in testMethodTypingContextAdaptMethod Replaced junit 4 test annotation with junit 5 test annotation in testClassTypingContextMethodSignature Replaced junit 4 test annotation with junit 5 test annotation in testClassContextOnInnerClass Replaced junit 4 test annotation with junit 5 test annotation in testWildCardonShadowClass Replaced junit 4 test annotation with junit 5 test annotation in testDiamondComplexGenericsRxJava Replaced junit 4 test annotation with junit 5 test annotation in testGetDeclarationOfTypeParameterReference Replaced junit 4 test annotation with junit 5 test annotation in testIsSameSignatureWithGenerics Replaced junit 4 test annotation with junit 5 test annotation in testIsSameSignatureWithMethodGenerics Replaced junit 4 test annotation with junit 5 test annotation in testGetExecDeclarationOfEnumSetOf Replaced junit 4 test annotation with junit 5 test annotation in testIsSameSignatureWithReferencedGenerics Replaced junit 4 test annotation with junit 5 test annotation in testIsGenericTypeEqual Replaced junit 4 test annotation with junit 5 test annotation in testCannotAdaptTypeOfNonTypeScope Replaced junit 4 test annotation with junit 5 test annotation in testGenericsOverriding Replaced junit 4 test annotation with junit 5 test annotation in testDeepGenericsInExecutableReference Replaced junit 4 test annotation with junit 5 test annotation in testTopLevelIsGenerics Replaced junit 4 test annotation with junit 5 test annotation in testIsParameterized Replaced junit 4 test annotation with junit 5 test annotation in testExecutableTypeParameter Transformed junit4 assert to junit 5 assertion in testBugComparableComparator Transformed junit4 assert to junit 5 assertion in testModelBuildingTree Transformed junit4 assert to junit 5 assertion in testModelBuildingGenericConstructor Transformed junit4 assert to junit 5 assertion in testDiamond2 Transformed junit4 assert to junit 5 assertion in testDiamond1 Transformed junit4 assert to junit 5 assertion in testModelBuildingSimilarSignatureMethods Transformed junit4 assert to junit 5 assertion in testTypeParameterReference Transformed junit4 assert to junit 5 assertion in testTypeParameterDeclarer Transformed junit4 assert to junit 5 assertion in testGenericMethodCallWithExtend Transformed junit4 assert to junit 5 assertion in testBugCommonCollection Transformed junit4 assert to junit 5 assertion in testRecursiveUpperBound Transformed junit4 assert to junit 5 assertion in testInstanceOfMapEntryGeneric Transformed junit4 assert to junit 5 assertion in testAccessToGenerics Transformed junit4 assert to junit 5 assertion in testConstructorCallGenerics Transformed junit4 assert to junit 5 assertion in testInvocationGenerics Transformed junit4 assert to junit 5 assertion in testNewClassGenerics Transformed junit4 assert to junit 5 assertion in testMethodsWithGenericsWhoExtendsObject Transformed junit4 assert to junit 5 assertion in testName Transformed junit4 assert to junit 5 assertion in testGenericWithExtendsInDeclaration Transformed junit4 assert to junit 5 assertion in testGenericInField Transformed junit4 assert to junit 5 assertion in testGenericsInQualifiedNameInConstructorCall Transformed junit4 assert to junit 5 assertion in testGenericsOnLocalType Transformed junit4 assert to junit 5 assertion in testGenericsInConstructorCall Transformed junit4 assert to junit 5 assertion in testWildcard Transformed junit4 assert to junit 5 assertion in testGetDeclarationOnGenericReturnType Transformed junit4 assert to junit 5 assertion in testDeclarationOfTypeParameterReference Transformed junit4 assert to junit 5 assertion in testIsGenericsMethod Transformed junit4 assert to junit 5 assertion in testTypeParameterReferenceAsActualTypeArgument Transformed junit4 assert to junit 5 assertion in testGenericTypeReference Transformed junit4 assert to junit 5 assertion in testisGeneric Transformed junit4 assert to junit 5 assertion in testCtTypeReference_getSuperclass Transformed junit4 assert to junit 5 assertion in testTypeAdapted Transformed junit4 assert to junit 5 assertion in testClassTypingContext Transformed junit4 assert to junit 5 assertion in testRecursiveTypeAdapting Transformed junit4 assert to junit 5 assertion in testMethodTypingContext Transformed junit4 assert to junit 5 assertion in testMethodTypingContextAdaptMethod Transformed junit4 assert to junit 5 assertion in testClassTypingContextMethodSignature Transformed junit4 assert to junit 5 assertion in testClassContextOnInnerClass Transformed junit4 assert to junit 5 assertion in checkFakeTpl Transformed junit4 assert to junit 5 assertion in testDiamondComplexGenericsRxJava Transformed junit4 assert to junit 5 assertion in testGetDeclarationOfTypeParameterReference Transformed junit4 assert to junit 5 assertion in testIsSameSignatureWithGenerics Transformed junit4 assert to junit 5 assertion in testIsSameSignatureWithMethodGenerics Transformed junit4 assert to junit 5 assertion in testGetExecDeclarationOfEnumSetOf Transformed junit4 assert to junit 5 assertion in testIsSameSignatureWithReferencedGenerics Transformed junit4 assert to junit 5 assertion in testIsGenericTypeEqual Transformed junit4 assert to junit 5 assertion in testCannotAdaptTypeOfNonTypeScope Transformed junit4 assert to junit 5 assertion in testGenericsOverriding Transformed junit4 assert to junit 5 assertion in testDeepGenericsInExecutableReference Transformed junit4 assert to junit 5 assertion in testTopLevelIsGenerics Transformed junit4 assert to junit 5 assertion in testIsParameterized Transformed junit4 assert to junit 5 assertion in testExecutableTypeParameter
monperrus
reviewed
Jan 17, 2022
@@ -896,17 +898,17 @@ public void testCtTypeReference_getSuperclass() { | |||
+ "spoon.test.generics.testclasses.Paella, " | |||
+ "X" | |||
+ ">",trWeddingLunch_Mole.getSuperclass().toString()); | |||
//future suggested behavior of CtTypeReference#getSuperclass() - the 3rd argument is Mole. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
interesting, here, sniper improves formatting.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
#3919
Change Log
The following bad smells are refactored:
JUnit4-@test
The JUnit 4
@Test
annotation should be replaced with JUnit 5@Test
annotation.JUnit4Assertion
The JUnit4 assertion should be replaced with JUnit5 Assertions.
The following has changed in the code:
JUnit4-@test
testBugComparableComparator
testModelBuildingTree
testModelBuildingGenericConstructor
testDiamond2
testDiamond1
testModelBuildingSimilarSignatureMethods
testTypeParameterReference
testTypeParameterDeclarer
testGenericMethodCallWithExtend
testBugCommonCollection
testRecursiveUpperBound
testInstanceOfMapEntryGeneric
testAccessToGenerics
testConstructorCallGenerics
testInvocationGenerics
testNewClassGenerics
testMethodsWithGenericsWhoExtendsObject
testName
testGenericWithExtendsInDeclaration
testGenericInField
testGenericsInQualifiedNameInConstructorCall
testGenericsOnLocalType
testGenericsInConstructorCall
testWildcard
testGetDeclarationOnGenericReturnType
testDeclarationOfTypeParameterReference
testIsGenericsMethod
testTypeParameterReferenceAsActualTypeArgument
testGenericTypeReference
testisGeneric
testCtTypeReference_getSuperclass
testTypeAdapted
testClassTypingContext
testRecursiveTypeAdapting
testMethodTypingContext
testMethodTypingContextAdaptMethod
testClassTypingContextMethodSignature
testClassContextOnInnerClass
testWildCardonShadowClass
testDiamondComplexGenericsRxJava
testGetDeclarationOfTypeParameterReference
testIsSameSignatureWithGenerics
testIsSameSignatureWithMethodGenerics
testGetExecDeclarationOfEnumSetOf
testIsSameSignatureWithReferencedGenerics
testIsGenericTypeEqual
testCannotAdaptTypeOfNonTypeScope
testGenericsOverriding
testDeepGenericsInExecutableReference
testTopLevelIsGenerics
testIsParameterized
testExecutableTypeParameter
JUnit4Assertion
testBugComparableComparator
testModelBuildingTree
testModelBuildingGenericConstructor
testDiamond2
testDiamond1
testModelBuildingSimilarSignatureMethods
testTypeParameterReference
testTypeParameterDeclarer
testGenericMethodCallWithExtend
testBugCommonCollection
testRecursiveUpperBound
testInstanceOfMapEntryGeneric
testAccessToGenerics
testConstructorCallGenerics
testInvocationGenerics
testNewClassGenerics
testMethodsWithGenericsWhoExtendsObject
testName
testGenericWithExtendsInDeclaration
testGenericInField
testGenericsInQualifiedNameInConstructorCall
testGenericsOnLocalType
testGenericsInConstructorCall
testWildcard
testGetDeclarationOnGenericReturnType
testDeclarationOfTypeParameterReference
testIsGenericsMethod
testTypeParameterReferenceAsActualTypeArgument
testGenericTypeReference
testisGeneric
testCtTypeReference_getSuperclass
testTypeAdapted
testClassTypingContext
testRecursiveTypeAdapting
testMethodTypingContext
testMethodTypingContextAdaptMethod
testClassTypingContextMethodSignature
testClassContextOnInnerClass
checkFakeTpl
testDiamondComplexGenericsRxJava
testGetDeclarationOfTypeParameterReference
testIsSameSignatureWithGenerics
testIsSameSignatureWithMethodGenerics
testGetExecDeclarationOfEnumSetOf
testIsSameSignatureWithReferencedGenerics
testIsGenericTypeEqual
testCannotAdaptTypeOfNonTypeScope
testGenericsOverriding
testDeepGenericsInExecutableReference
testTopLevelIsGenerics
testIsParameterized
testExecutableTypeParameter