Remove @Ignore and add expected / Fix inspector warnings

This commit is contained in:
Trustin Lee 2013-04-11 17:29:37 +09:00
parent e556232aeb
commit 15ac4127e4

View File

@ -16,7 +16,6 @@
package io.netty.util.internal; package io.netty.util.internal;
import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import java.util.Date; import java.util.Date;
@ -132,17 +131,16 @@ public class TypeParameterMatcherTest {
assertTrue(m.match(new Object())); assertTrue(m.match(new Object()));
} }
private abstract class W<E> { private static abstract class W<E> {
// Noop E e;
} }
private class X<T, E> extends W<E> { private static class X<T, E> extends W<E> {
// Noop T t;
} }
@Ignore("Fail currently because of #1247") @Test(expected = IllegalStateException.class)
@Test public void testErasure() throws Exception {
public void testConcreteClassWithGeneric() throws Exception {
TypeParameterMatcher m = TypeParameterMatcher.find(new X<String, Date>(), W.class, "E"); TypeParameterMatcher m = TypeParameterMatcher.find(new X<String, Date>(), W.class, "E");
assertTrue(m.match(new Date())); assertTrue(m.match(new Date()));
assertFalse(m.match(new Object())); assertFalse(m.match(new Object()));