test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File webrev Cdiff test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java

test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2014, 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. --- 1,7 ---- /* ! * Copyright (c) 2014, 2017, 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.
*** 34,46 **** import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.Platform; public class VMOptionWarning { public static void main(String[] args) throws Exception { ! ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+PredictedLoadedClassCount", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); ! output.shouldContain("Error: VM option 'PredictedLoadedClassCount' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions."); if (Platform.isDebugBuild()) { System.out.println("Skip the rest of the tests on debug builds since diagnostic, develop, and notproduct options are available on debug builds."); return; } --- 34,46 ---- import jdk.test.lib.process.OutputAnalyzer; import jdk.test.lib.Platform; public class VMOptionWarning { public static void main(String[] args) throws Exception { ! ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+AlwaysSafeConstructors", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); ! output.shouldContain("Error: VM option 'AlwaysSafeConstructors' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions."); if (Platform.isDebugBuild()) { System.out.println("Skip the rest of the tests on debug builds since diagnostic, develop, and notproduct options are available on debug builds."); return; }
test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File