hotspot/test/runtime/CommandLine/FlagWithInvalidValue.java
changeset 16433 0d9b53c3b2ee
parent 15592 4eec33e264bb
child 29678 dd2f3932c21e
equal deleted inserted replaced
16432:1c1a3b0a15df 16433:0d9b53c3b2ee
    31 import com.oracle.java.testlibrary.*;
    31 import com.oracle.java.testlibrary.*;
    32 
    32 
    33 public class FlagWithInvalidValue {
    33 public class FlagWithInvalidValue {
    34   public static void main(String[] args) throws Exception {
    34   public static void main(String[] args) throws Exception {
    35     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
    35     ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
    36         "-XX:ObjectAlignmentInBytes=v", "-version");
    36         "-XX:MaxRAMFraction=v", "-version");
    37 
    37 
    38     OutputAnalyzer output = new OutputAnalyzer(pb.start());
    38     OutputAnalyzer output = new OutputAnalyzer(pb.start());
    39     output.shouldContain("Improperly specified VM option 'ObjectAlignmentInBytes=v'");
    39     output.shouldContain("Improperly specified VM option 'MaxRAMFraction=v'");
    40     output.shouldHaveExitValue(1);
    40     output.shouldHaveExitValue(1);
    41   }
    41   }
    42 }
    42 }