|
|
@@ -32,17 +32,10 @@ public class RWClassTest {
|
|
|
assertEquals(Arrays.asList(), ic1.interfaces().stream().distinct().list());
|
|
|
assertEquals("? super java.util.ArrayList<java.lang.Float>", ic1.reflective().toString());
|
|
|
assertEquals(Object.class, ic1.raw());
|
|
|
- // @todo (assira #6) reflective: generics: isInstance dla wildcards
|
|
|
- // rzecz w tym, że my tu mamy unresolved params, bo przekazujemy objekt (i type erasure wchodzi)
|
|
|
- // a to oznacza, że NIE powinno tutaj nic matchować na ten moment
|
|
|
- // o ile nie zrobimy obsługi prawdziwej dla atrybutu IAttribute.RESOLVED
|
|
|
- // tylko w takim wypadku możemy być "tolerancyjniejsi" względem erasure'owanych typów
|
|
|
- // i je przepuszczać
|
|
|
-
|
|
|
- // test dla wildcardów powinien opierać się na isSuper/isSubclass dla TypeToken jako argumentu
|
|
|
- // bo on zawiera całe info na temat typu testowanego
|
|
|
-// System.out.printf("%s%n", ic1);
|
|
|
-// assertTrue(ic1.isInstance(new ArrayList<Float>()));
|
|
|
+
|
|
|
+ // https://git.ranides.net/projects/assira/issues/24
|
|
|
+ // System.out.printf("%s%n", ic1);
|
|
|
+ // assertTrue(ic1.isInstance(new ArrayList<Float>()));
|
|
|
|
|
|
assertFalse(ic1.isInstance(new ArrayList<Double>()));
|
|
|
assertFalse(ic1.isInstance(new java.util.LinkedList<Float>()));
|