7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @summary Basic test of VM::getRuntimeArguments
27 * @library /lib/testlibrary
28 * @modules java.base/jdk.internal.misc
29 * jdk.zipfs
30 * @run testng RuntimeArguments
31 */
32
33 import java.util.Arrays;
34 import java.util.List;
35 import java.util.stream.Stream;
36 import jdk.internal.misc.VM;
37 import jdk.testlibrary.ProcessTools;
38 import org.testng.annotations.DataProvider;
39 import org.testng.annotations.Test;
40 import static org.testng.Assert.*;
41
42 public class RuntimeArguments {
43 static final String TEST_CLASSES = System.getProperty("test.classes");
44
45 @DataProvider(name = "options")
46 public Object[][] options() {
47 return new Object[][] {
48 { // CLI options
49 List.of("--add-exports",
50 "java.base/jdk.internal.misc=ALL-UNNAMED",
51 "--add-exports",
52 "java.base/jdk.internal.perf=ALL-UNNAMED",
53 "--add-modules",
54 "jdk.zipfs"),
55 // expected runtime arguments
56 List.of("--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED",
57 "--add-exports=java.base/jdk.internal.perf=ALL-UNNAMED",
|
7 * published by the Free Software Foundation.
8 *
9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 * version 2 for more details (a copy is included in the LICENSE file that
13 * accompanied this code).
14 *
15 * You should have received a copy of the GNU General Public License version
16 * 2 along with this work; if not, write to the Free Software Foundation,
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 *
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 * or visit www.oracle.com if you need additional information or have any
21 * questions.
22 */
23
24 /**
25 * @test
26 * @summary Basic test of VM::getRuntimeArguments
27 * @library /test/lib
28 * @modules java.base/jdk.internal.misc
29 * jdk.zipfs
30 * @run testng RuntimeArguments
31 */
32
33 import java.util.Arrays;
34 import java.util.List;
35 import java.util.stream.Stream;
36 import jdk.internal.misc.VM;
37 import jdk.test.lib.process.ProcessTools;
38 import org.testng.annotations.DataProvider;
39 import org.testng.annotations.Test;
40 import static org.testng.Assert.*;
41
42 public class RuntimeArguments {
43 static final String TEST_CLASSES = System.getProperty("test.classes");
44
45 @DataProvider(name = "options")
46 public Object[][] options() {
47 return new Object[][] {
48 { // CLI options
49 List.of("--add-exports",
50 "java.base/jdk.internal.misc=ALL-UNNAMED",
51 "--add-exports",
52 "java.base/jdk.internal.perf=ALL-UNNAMED",
53 "--add-modules",
54 "jdk.zipfs"),
55 // expected runtime arguments
56 List.of("--add-exports=java.base/jdk.internal.misc=ALL-UNNAMED",
57 "--add-exports=java.base/jdk.internal.perf=ALL-UNNAMED",
|