32 public class BMISupportedCPUTest extends BMICommandLineOptionTestBase {
33
34 /**
35 * Construct new test on {@code optionName} option.
36 *
37 * @param optionName Name of the option to be tested
38 * without -XX:[+-] prefix.
39 * @param warningMessage Message that can occur in VM output
40 * if CPU on test box does not support
41 * features required by the option.
42 * @param cpuFeatures CPU features requires by the option.
43 */
44 public BMISupportedCPUTest(String optionName,
45 String warningMessage,
46 String... cpuFeatures) {
47 super(optionName, warningMessage, cpuFeatures, null);
48 }
49
50 @Override
51 public void runTestCases() throws Throwable {
52 // verify that VM will succesfully start up whithout warnings
53 CommandLineOptionTest.
54 verifyJVMStartup("-XX:+" + optionName,
55 null, new String[] { warningMessage },
56 ExitCode.OK);
57
58 // verify that VM will succesfully start up whithout warnings
59 CommandLineOptionTest.
60 verifyJVMStartup("-XX:-" + optionName,
61 null, new String[] { warningMessage },
62 ExitCode.OK);
63
64 // verify that on appropriate CPU option in on by default
65 CommandLineOptionTest.verifyOptionValue(optionName, "true");
66
67 // verify that option could be explicitly turned off
68 CommandLineOptionTest.verifyOptionValue(optionName, "false",
69 "-XX:-" + optionName);
70 }
71 }
72
|
32 public class BMISupportedCPUTest extends BMICommandLineOptionTestBase {
33
34 /**
35 * Construct new test on {@code optionName} option.
36 *
37 * @param optionName Name of the option to be tested
38 * without -XX:[+-] prefix.
39 * @param warningMessage Message that can occur in VM output
40 * if CPU on test box does not support
41 * features required by the option.
42 * @param cpuFeatures CPU features requires by the option.
43 */
44 public BMISupportedCPUTest(String optionName,
45 String warningMessage,
46 String... cpuFeatures) {
47 super(optionName, warningMessage, cpuFeatures, null);
48 }
49
50 @Override
51 public void runTestCases() throws Throwable {
52 // verify that VM will successfully start up without warnings
53 CommandLineOptionTest.verifySameJVMStartup(null,
54 new String[] { warningMessage }, ExitCode.OK,
55 CommandLineOptionTest.prepareBooleanFlag(optionName, true));
56
57 // verify that VM will successfully start up without warnings
58 CommandLineOptionTest.verifySameJVMStartup(null,
59 new String[] { warningMessage }, ExitCode.OK,
60 CommandLineOptionTest.prepareBooleanFlag(optionName, false));
61
62 // verify that on appropriate CPU option in on by default
63 CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "true");
64
65 // verify that option could be explicitly turned off
66 CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false",
67 CommandLineOptionTest.prepareBooleanFlag(optionName, false));
68 }
69 }
70
|