File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
src/test/java/org/apache/commons/lang3/reflect Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -440,6 +440,19 @@ void testDetermineTypeArguments() throws NoSuchFieldException {
440440 assertThrows (NullPointerException .class , () -> TypeUtils .determineTypeArguments (null , iterableType ));
441441 }
442442
443+ @ Test
444+ void testEquals () throws NoSuchFieldException {
445+ final Type expected = getClass ().getField ("intWildcardComparable" ).getGenericType ();
446+ final GenericArrayType gat1 = TypeUtils
447+ .genericArrayType (TypeUtils .parameterize (Comparable .class , TypeUtils .wildcardType ().withUpperBounds (Integer .class ).build ()));
448+ final GenericArrayType gat2 = TypeUtils
449+ .genericArrayType (TypeUtils .parameterize (Comparable .class , TypeUtils .wildcardType ().withUpperBounds (Integer .class ).build ()));
450+ assertTrue (TypeUtils .equals (gat1 , gat1 ));
451+ assertTrue (TypeUtils .equals (gat1 , gat2 ));
452+ assertFalse (TypeUtils .equals (gat1 , null ));
453+ assertFalse (TypeUtils .equals (null , gat1 ));
454+ }
455+
443456 @ SuppressWarnings ("unlikely-arg-type" )
444457 @ Test
445458 void testGenericArrayType () throws NoSuchFieldException {
You can’t perform that action at this time.
0 commit comments