test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File
*** old/test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java	Wed Nov  1 11:21:50 2017
--- new/test/hotspot/jtreg/runtime/CommandLine/VMOptionWarning.java	Wed Nov  1 11:21:49 2017

*** 1,7 **** --- 1,7 ---- /* ! * Copyright (c) 2014, 2016, Oracle and/or its affiliates. All rights reserved. ! * 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 **** --- 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"); ! ProcessBuilder pb = ProcessTools.createJavaProcessBuilder("-XX:+AlwaysSafeConstructors", "-version"); OutputAnalyzer output = new OutputAnalyzer(pb.start()); ! output.shouldContain("Error: VM option 'PredictedLoadedClassCount' is experimental and must be enabled via -XX:+UnlockExperimentalVMOptions."); ! 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