StringTest.java revision 6544:7daf195e6193
1249259Sdim/*
2249259Sdim * Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
3249259Sdim * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4249259Sdim *
5249259Sdim * This code is free software; you can redistribute it and/or modify it
6249259Sdim * under the terms of the GNU General Public License version 2 only, as
7249259Sdim * published by the Free Software Foundation.
8249259Sdim *
9249259Sdim * This code is distributed in the hope that it will be useful, but WITHOUT
10249259Sdim * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11249259Sdim * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
12249259Sdim * version 2 for more details (a copy is included in the LICENSE file that
13249259Sdim * accompanied this code).
14249259Sdim *
15249259Sdim * You should have received a copy of the GNU General Public License version
16249259Sdim * 2 along with this work; if not, write to the Free Software Foundation,
17249259Sdim * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18249259Sdim *
19249259Sdim * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20249259Sdim * or visit www.oracle.com if you need additional information or have any
21249259Sdim * questions.
22249259Sdim */
23249259Sdim
24249259Sdim/*
25249259Sdim * @test StringTest
26249259Sdim * @bug 8028756
27249259Sdim * @library /testlibrary /testlibrary/whitebox
28249259Sdim * @build StringTest
29249259Sdim * @run main ClassFileInstaller sun.hotspot.WhiteBox
30249259Sdim * @run main/othervm/timeout=600 -Xbootclasspath/a:. -XX:+UnlockDiagnosticVMOptions -XX:+WhiteBoxAPI StringTest
31249259Sdim * @summary testing of WB::set/getStringVMFlag()
32249259Sdim * @author igor.ignatyev@oracle.com
33249259Sdim */
34249259Sdim
35249259Sdimpublic class StringTest {
36249259Sdim    private static final String FLAG_NAME = "CompileOnly";
37249259Sdim    private static final String[] TESTS = {"StringTest::*", ""};
38249259Sdim
39249259Sdim    public static void main(String[] args) throws Exception {
40249259Sdim        VmFlagTest.runTest(FLAG_NAME, TESTS,
41249259Sdim            VmFlagTest.WHITE_BOX::setStringVMFlag,
42249259Sdim            VmFlagTest.WHITE_BOX::getStringVMFlag);
43249259Sdim    }
44249259Sdim}
45249259Sdim
46249259Sdim