< prev index next >

test/java/lang/reflect/Proxy/ProxyClassAccessTest.java

Print this page

        

*** 28,48 **** 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 ProxyClassAccessTest q.NP CompilerUtils jdk.testlibrary.* * @run testng ProxyClassAccessTest * @summary Driver for testing proxy class doesn't have access to * types referenced by proxy interfaces */ --- 28,48 ---- 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 ProxyClassAccessTest q.NP CompilerUtils jdk.testlibrary.tasks.JavaTask * @run testng ProxyClassAccessTest * @summary Driver for testing proxy class doesn't have access to * types referenced by proxy interfaces */
*** 71,87 **** /** * Run the modular test */ @Test public void runTest() throws Exception { ! int exitValue = executeTestJava("--module-path", MODS_DIR.toString(), ! "-m", "test/jdk.test.ProxyClassAccess") ! .outputTo(System.out) ! .errorTo(System.out) ! .getExitValue(); ! ! assertTrue(exitValue == 0); } /** * Test unnamed module has no access to other proxy interface */ --- 71,83 ---- /** * Run the modular test */ @Test public void runTest() throws Exception { ! new JavaTask().ignoreStandardModuleOptions() ! .modulepath(MODS_DIR.toString()) ! .moduleName("test").className("jdk.test.ProxyClassAccess").run(); } /** * Test unnamed module has no access to other proxy interface */
< prev index next >