test/java/lang/invoke/MethodTypeTest.java

Print this page
rev 7821 : 8022749: Convert junit tests to testng in test/java/lang/invoke
Reviewed-by: mduigou, jjg
Contributed-by: Mani Sarkar <sadhak001@gmail.com>

*** 22,43 **** */ /* @test * @summary unit tests for java.lang.invoke.MethodType * @compile MethodTypeTest.java ! * @run junit/othervm test.java.lang.invoke.MethodTypeTest */ package test.java.lang.invoke; import java.io.IOException; import java.lang.invoke.MethodType; import java.lang.reflect.Method; import java.util.*; ! import org.junit.*; ! import static org.junit.Assert.*; /** * * @author jrose */ --- 22,44 ---- */ /* @test * @summary unit tests for java.lang.invoke.MethodType * @compile MethodTypeTest.java ! * @run testng/othervm test.java.lang.invoke.MethodTypeTest */ package test.java.lang.invoke; import java.io.IOException; import java.lang.invoke.MethodType; import java.lang.reflect.Method; import java.util.*; ! import org.testng.*; ! import static org.testng.AssertJUnit.*; ! import org.testng.annotations.*; /** * * @author jrose */
*** 51,61 **** private MethodType mt_VIO, mt_IO2, mt_OOI, mt_IOI, mt_VIS; private MethodType mt_vOiSzA, mt_OO99; private MethodType[] GALLERY; private Method compareTo; ! @Before public void setUp() throws Exception { rtype = void.class; ptypes = new Class<?>[] { int.class, String.class }; mt_viS = MethodType.methodType(void.class, int.class, String.class); --- 52,62 ---- private MethodType mt_VIO, mt_IO2, mt_OOI, mt_IOI, mt_VIS; private MethodType mt_vOiSzA, mt_OO99; private MethodType[] GALLERY; private Method compareTo; ! @BeforeMethod public void setUp() throws Exception { rtype = void.class; ptypes = new Class<?>[] { int.class, String.class }; mt_viS = MethodType.methodType(void.class, int.class, String.class);
*** 92,102 **** mt_VIO, mt_IO2, mt_OOI, mt_IOI, mt_VIS, mt_vOiSzA, mt_OO99 }; } ! @After public void tearDown() throws Exception { } /** Make sure the method types are all distinct. */ @Test --- 93,103 ---- mt_VIO, mt_IO2, mt_OOI, mt_IOI, mt_VIS, mt_vOiSzA, mt_OO99 }; } ! @AfterMethod public void tearDown() throws Exception { } /** Make sure the method types are all distinct. */ @Test