--- old/test/compiler/arguments/BMIUnsupportedCPUTest.java 2014-12-02 13:40:54.814144923 +0300 +++ new/test/compiler/arguments/BMIUnsupportedCPUTest.java 2014-12-02 13:40:54.550144931 +0300 @@ -75,9 +75,13 @@ warning. VM will be launched with following options: -XX:+ -version */ + String errorString = String.format("JVM should start with '-XX:+%s' " + + "flag, but output should contain warning.", optionName); CommandLineOptionTest.verifySameJVMStartup( new String[] { warningMessage }, new String[] { errorMessage }, - ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag( + errorString, String.format("Option '%s' is unsupported.%n" + + "Warning expected to be shown.", optionName), ExitCode.OK, + CommandLineOptionTest.prepareBooleanFlag( optionName, true)); /* @@ -85,15 +89,21 @@ VM will be launched with following options: -XX:- -version */ + errorString = String.format("JVM should start with '-XX:-%s' flag " + + "without any warnings", optionName); CommandLineOptionTest.verifySameJVMStartup(null, - new String[] { warningMessage, errorMessage }, ExitCode.OK, + new String[] { warningMessage, errorMessage }, + errorString, errorString, ExitCode.OK, CommandLineOptionTest.prepareBooleanFlag(optionName, false)); /* - Verify that on unsupported CPUs option is off by default. - VM will be launched with following options: -version - */ - CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false"); + * Verify that on unsupported CPUs option is off by default. VM will be + * launched with following options: -version + */ + CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false", + String.format("Option '%s' is expected to have default value " + + "'false' since feature required is not supported " + + "on CPU", optionName)); /* Verify that on unsupported CPUs option will be off even if @@ -101,6 +111,9 @@ following options: -XX:+ -version */ CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false", + String.format("Option '%s' is expected to have default value" + + " 'false' since feature required is not supported on" + + " CPU even if user set another value.", optionName), CommandLineOptionTest.prepareBooleanFlag(optionName, true)); } @@ -118,11 +131,17 @@ with following options: -XX:[+-] -version */ CommandLineOptionTest.verifySameJVMStartup( - new String[] { errorMessage }, null, ExitCode.FAIL, + new String[] { errorMessage }, null, + String.format("JVM startup should fail with '-XX:+%s' flag." + + "%nOption should be unknown (non-X86CPU).", + optionName), "", ExitCode.FAIL, CommandLineOptionTest.prepareBooleanFlag(optionName, true)); CommandLineOptionTest.verifySameJVMStartup( - new String[] { errorMessage }, null, ExitCode.FAIL, + new String[] { errorMessage }, null, + String.format("JVM startup should fail with '-XX:-%s' flag." + + "%nOption should be unknown (non-X86CPU)", + optionName), "", ExitCode.FAIL, CommandLineOptionTest.prepareBooleanFlag(optionName, false)); } }