< prev index next >
test/java/lang/reflect/Proxy/ProxyClassAccessTest.java
Print this page
@@ -28,21 +28,21 @@
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 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.*
+ * @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,17 +71,13 @@
/**
* 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);
+ 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 >