test/java/lang/invoke/InvokeGenericTest.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>
@@ -24,24 +24,23 @@
*/
/* @test
* @summary unit tests for java.lang.invoke.MethodHandle.invoke
* @compile InvokeGenericTest.java
- * @run junit/othervm test.java.lang.invoke.InvokeGenericTest
+ * @run testng/othervm test.java.lang.invoke.InvokeGenericTest
*/
package test.java.lang.invoke;
import java.lang.invoke.*;
import static java.lang.invoke.MethodHandles.*;
import static java.lang.invoke.MethodType.*;
import java.lang.reflect.*;
import java.util.*;
-import org.junit.*;
-import static org.junit.Assert.*;
-import static org.junit.Assume.*;
-
+import org.testng.*;
+import static org.testng.AssertJUnit.*;
+import org.testng.annotations.*;
/**
*
* @author jrose
*/
@@ -69,11 +68,11 @@
}
String testName;
static int allPosTests, allNegTests;
int posTests, negTests;
- @After
+ @AfterMethod
public void printCounts() {
if (verbosity >= 2 && (posTests | negTests) != 0) {
System.out.println();
if (posTests != 0) System.out.println("=== "+testName+": "+posTests+" positive test cases run");
if (negTests != 0) System.out.println("=== "+testName+": "+negTests+" negative test cases run");