8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /* @test
27 * @summary unit tests for method handles which permute their arguments
28 * @run junit test.java.lang.invoke.ThrowExceptionsTest
29 */
30
31 package test.java.lang.invoke;
32
33 import org.junit.*;
34
35 import java.util.*;
36 import java.lang.reflect.*;
37
38 import java.lang.invoke.*;
39 import static java.lang.invoke.MethodHandles.*;
40 import static java.lang.invoke.MethodType.*;
41
42 public class ThrowExceptionsTest {
43 private static final Class<?> CLASS = ThrowExceptionsTest.class;
44 private static final Lookup LOOKUP = lookup();
45
46 public static void main(String argv[]) throws Throwable {
47 new ThrowExceptionsTest().testAll((argv.length == 0 ? null : Arrays.asList(argv).toString()));
48 }
49
50 @Test
51 public void testWMT() throws Throwable {
52 // mostly call testWMTCallee, but sometimes call its void-returning variant
53 MethodHandle mh = testWMTCallee();
|
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
23 * questions.
24 */
25
26 /* @test
27 * @summary unit tests for method handles which permute their arguments
28 * @run testng test.java.lang.invoke.ThrowExceptionsTest
29 */
30
31 package test.java.lang.invoke;
32
33 import org.testng.*;
34 import org.testng.annotations.*;
35
36 import java.util.*;
37 import java.lang.reflect.*;
38
39 import java.lang.invoke.*;
40 import static java.lang.invoke.MethodHandles.*;
41 import static java.lang.invoke.MethodType.*;
42
43 public class ThrowExceptionsTest {
44 private static final Class<?> CLASS = ThrowExceptionsTest.class;
45 private static final Lookup LOOKUP = lookup();
46
47 public static void main(String argv[]) throws Throwable {
48 new ThrowExceptionsTest().testAll((argv.length == 0 ? null : Arrays.asList(argv).toString()));
49 }
50
51 @Test
52 public void testWMT() throws Throwable {
53 // mostly call testWMTCallee, but sometimes call its void-returning variant
54 MethodHandle mh = testWMTCallee();
|