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,47 **** */ /* @test * @summary unit tests for java.lang.invoke.MethodHandle.invoke * @compile InvokeGenericTest.java ! * @run junit/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.*; ! /** * * @author jrose */ --- 24,46 ---- */ /* @test * @summary unit tests for java.lang.invoke.MethodHandle.invoke * @compile InvokeGenericTest.java ! * @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.testng.*; ! import static org.testng.AssertJUnit.*; ! import org.testng.annotations.*; /** * * @author jrose */
*** 69,79 **** } String testName; static int allPosTests, allNegTests; int posTests, negTests; ! @After 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"); --- 68,78 ---- } String testName; static int allPosTests, allNegTests; int posTests, negTests; ! @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");