< prev index next >
test/java/lang/reflect/Proxy/ProxyTest.java
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
--- 1,7 ----
/*
! * Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*** 24,44 ****
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
! import static jdk.testlibrary.ProcessTools.executeTestJava;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
/**
* @test
* @library /lib/testlibrary
* @modules jdk.compiler
! * @build ProxyTest q.U CompilerUtils jdk.testlibrary.*
* @run testng ProxyTest
* @summary Driver for testing proxies accessing interfaces in named modules
*/
public class ProxyTest {
--- 24,44 ----
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Arrays;
import java.util.List;
! import jdk.testlibrary.tasks.JavaTask;
import org.testng.annotations.BeforeTest;
import org.testng.annotations.Test;
import static org.testng.Assert.*;
/**
* @test
* @library /lib/testlibrary
* @modules jdk.compiler
! * @build ProxyTest q.U CompilerUtils jdk.testlibrary.tasks.JavaTask
* @run testng ProxyTest
* @summary Driver for testing proxies accessing interfaces in named modules
*/
public class ProxyTest {
*** 67,82 ****
/**
* Run the modular test
*/
@Test
! public void runTest() throws Exception {
! int exitValue = executeTestJava("-cp", CPATH_DIR.toString(),
! "--module-path", MODS_DIR.toString(),
! "-m", "test/jdk.test.Main")
! .outputTo(System.out)
! .errorTo(System.out)
! .getExitValue();
!
! assertTrue(exitValue == 0);
}
}
--- 67,79 ----
/**
* Run the modular test
*/
@Test
! public void runTest() {
! new JavaTask().ignoreStandardModuleOptions()
! .classPath(CPATH_DIR)
! .modulePath(MODS_DIR)
! .module("test", "jdk.test.Main")
! .run();
}
}
< prev index next >