< prev index next >
test/java/lang/reflect/Proxy/ProxyTest.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
+ * 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,21 +24,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 ProxyTest q.U CompilerUtils jdk.testlibrary.*
+ * @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 {
@@ -68,15 +68,11 @@
/**
* 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);
+ new JavaTask().ignoreStandardModuleOptions()
+ .classpath(CPATH_DIR.toString())
+ .modulepath(MODS_DIR.toString())
+ .moduleName("test").className("jdk.test.Main").run();
}
}
< prev index next >