8256066: Tests use deprecated TestNG API that is no longer available in new versions
Reviewed-by: jjg
This commit is contained in:
parent
643969a184
commit
6d8acd2696
@ -59,8 +59,7 @@ public class ConstantIdentityMHTest {
|
||||
assertEquals(MethodHandles.zero(expectedtype).type().toString(), expected);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ExpectedExceptions(NullPointerException.class)
|
||||
@Test(expectedExceptions={ NullPointerException.class })
|
||||
public void testZeroNPE() {
|
||||
MethodHandle mh = MethodHandles.zero(null);
|
||||
}
|
||||
@ -73,8 +72,7 @@ public class ConstantIdentityMHTest {
|
||||
assertEquals((String)mhEmpty.invoke("x","y"), null);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ExpectedExceptions(NullPointerException.class)
|
||||
@Test(expectedExceptions = { NullPointerException.class })
|
||||
void testEmptyNPE() {
|
||||
MethodHandle lenEmptyMH = MethodHandles.empty(null);
|
||||
}
|
||||
|
@ -65,8 +65,7 @@ public class DropArgumentsTest {
|
||||
};
|
||||
}
|
||||
|
||||
@Test(dataProvider = "dropArgumentsToMatchNPEData")
|
||||
@ExpectedExceptions(NullPointerException.class)
|
||||
@Test(dataProvider = "dropArgumentsToMatchNPEData", expectedExceptions = { NullPointerException.class })
|
||||
public void dropArgumentsToMatchNPE(MethodHandle target, int pos, List<Class<?>> valueType, int skip) {
|
||||
MethodHandles.dropArgumentsToMatch(target, pos, valueType , skip);
|
||||
}
|
||||
@ -85,14 +84,12 @@ public class DropArgumentsTest {
|
||||
};
|
||||
}
|
||||
|
||||
@Test(dataProvider = "dropArgumentsToMatchIAEData")
|
||||
@ExpectedExceptions(IllegalArgumentException.class)
|
||||
@Test(dataProvider = "dropArgumentsToMatchIAEData", expectedExceptions = { IllegalArgumentException.class })
|
||||
public void dropArgumentsToMatchIAE(MethodHandle target, int pos, List<Class<?>> valueType, int skip) {
|
||||
MethodHandles.dropArgumentsToMatch(target, pos, valueType , skip);
|
||||
}
|
||||
|
||||
@Test
|
||||
@ExpectedExceptions(IllegalArgumentException.class)
|
||||
@Test(expectedExceptions = { IllegalArgumentException.class })
|
||||
public void dropArgumentsToMatchTestWithVoid() throws Throwable {
|
||||
MethodHandle cat = lookup().findVirtual(String.class, "concat",
|
||||
MethodType.methodType(String.class, String.class));
|
||||
|
@ -69,8 +69,7 @@ public class VarArgsTest {
|
||||
assertEquals("[two, too]", asListWithVarargs.invoke("two", "too").toString());
|
||||
}
|
||||
|
||||
@Test
|
||||
@ExpectedExceptions(IllegalArgumentException.class)
|
||||
@Test(expectedExceptions = { IllegalArgumentException.class })
|
||||
public void testWithVarargsIAE() throws Throwable {
|
||||
MethodHandle lenMH = publicLookup()
|
||||
.findVirtual(String.class, "length", methodType(int.class));
|
||||
|
Loading…
Reference in New Issue
Block a user