当前位置: 首页>>代码示例>>Java>>正文


Java CommandLineOptionTest.verifySameJVMStartup方法代码示例

本文整理汇总了Java中com.oracle.java.testlibrary.cli.CommandLineOptionTest.verifySameJVMStartup方法的典型用法代码示例。如果您正苦于以下问题:Java CommandLineOptionTest.verifySameJVMStartup方法的具体用法?Java CommandLineOptionTest.verifySameJVMStartup怎么用?Java CommandLineOptionTest.verifySameJVMStartup使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.oracle.java.testlibrary.cli.CommandLineOptionTest的用法示例。


在下文中一共展示了CommandLineOptionTest.verifySameJVMStartup方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: runTestCases

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
public void runTestCases() throws Throwable {
    // verify that option could be turned on
    CommandLineOptionTest.verifySameJVMStartup(
            null, null, ExitCode.OK, "-XX:+UseRTMDeopt");
    // verify that option could be turned off
    CommandLineOptionTest.verifySameJVMStartup(
            null, null, ExitCode.OK, "-XX:-UseRTMDeopt");
    // verify default value
    CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt",
            TestUseRTMDeoptOptionOnSupportedConfig.DEFAULT_VALUE);
    // verify default value
    CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt",
            TestUseRTMDeoptOptionOnSupportedConfig.DEFAULT_VALUE,
            CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
            "-XX:+UseRTMLocking");
    // verify that option is off when UseRTMLocking is off
    CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", "false",
            CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
            "-XX:-UseRTMLocking", "-XX:+UseRTMDeopt");
    // verify that option could be turned on
    CommandLineOptionTest.verifyOptionValueForSameVM("UseRTMDeopt", "true",
            CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
            "-XX:+UseRTMLocking", "-XX:+UseRTMDeopt");
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:26,代码来源:TestUseRTMDeoptOptionOnSupportedConfig.java

示例2: verifyWarnings

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyWarnings() throws Throwable {
    // Verify that when the tested option is explicitly enabled, then
    // a warning will occur in VM output.
    CommandLineOptionTest.verifySameJVMStartup(new String[] {
                    SHAOptionsBase.getWarningForUnsupportedCPU(optionName)
            }, null, ExitCode.OK,
            CommandLineOptionTest.prepareBooleanFlag(optionName, true));

    // Verify that the tested option could be explicitly disabled without
    // a warning.
    CommandLineOptionTest.verifySameJVMStartup(null, new String[] {
                    SHAOptionsBase.getWarningForUnsupportedCPU(optionName)
            }, ExitCode.OK,
            CommandLineOptionTest.prepareBooleanFlag(optionName, false));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:17,代码来源:GenericTestCaseForUnsupportedX86CPU.java

示例3: verifyWarnings

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyWarnings() throws Throwable {
    // Verify that there are no warning when option is explicitly enabled.
    CommandLineOptionTest.verifySameJVMStartup(null, new String[] {
                    SHAOptionsBase.getWarningForUnsupportedCPU(optionName)
            }, ExitCode.OK,
            CommandLineOptionTest.prepareBooleanFlag(optionName, true));

    // Verify that option could be disabled even if +UseSHA was passed to
    // JVM.
    CommandLineOptionTest.verifySameJVMStartup(null, new String[] {
                    SHAOptionsBase.getWarningForUnsupportedCPU(optionName)
            }, ExitCode.OK,
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA_OPTION, true),
            CommandLineOptionTest.prepareBooleanFlag(optionName, false));

    // Verify that it is possible to enable the tested option and disable
    // all SHA intrinsics via -UseSHA without any warnings.
    CommandLineOptionTest.verifySameJVMStartup(null, new String[] {
                    SHAOptionsBase.getWarningForUnsupportedCPU(optionName)
            }, ExitCode.OK,
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA_OPTION, false),
            CommandLineOptionTest.prepareBooleanFlag(optionName, true));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:27,代码来源:GenericTestCaseForSupportedSparcCPU.java

示例4: runX86SupportedVMTestCases

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void runX86SupportedVMTestCases() throws Throwable {
    // verify that option is experimental
    CommandLineOptionTest.verifySameJVMStartup(
            new String[]{ experimentalOptionError },
            null, ExitCode.FAIL, prepareOptionValue("true"));

    CommandLineOptionTest.verifySameJVMStartup(
            new String[]{ experimentalOptionError },
            null, ExitCode.FAIL, prepareOptionValue("false"));

    // verify that if we turn it on, then VM output will contain
    // warning saying that this option could be turned on only
    // when we use rtm locking
    CommandLineOptionTest.verifySameJVMStartup(
            new String[]{
                RTMGenericCommandLineOptionTest.RTM_FOR_STACK_LOCKS_WARNING
            },
            null, ExitCode.OK,
            CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
            prepareOptionValue("true")
    );
    // verify that options is turned off by default
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName,
            TestUseRTMForStackLocksOptionOnUnsupportedConfig.DEFAULT_VALUE,
            CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS);
    // verify that it could not be turned on without rtm locking
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName,
            TestUseRTMForStackLocksOptionOnUnsupportedConfig.DEFAULT_VALUE,
            CommandLineOptionTest.UNLOCK_EXPERIMENTAL_VM_OPTIONS,
            prepareOptionValue("true"));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:33,代码来源:TestUseRTMForStackLocksOptionOnUnsupportedConfig.java

示例5: verifyWarnings

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyWarnings() throws Throwable {
    // Verify that there will be no warnings when +UseSHA was passed and
    // all UseSHA*Intrinsics options were disabled.
    CommandLineOptionTest.verifySameJVMStartup(
            null, new String[] { ".*UseSHA.*" }, ExitCode.OK,
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA_OPTION, true),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA1_INTRINSICS_OPTION, false),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA256_INTRINSICS_OPTION, false),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA512_INTRINSICS_OPTION, false));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:16,代码来源:UseSHASpecificTestCaseForSupportedSparcCPU.java

示例6: verifyWarnings

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyWarnings() throws Throwable {
    // Verify that attempt to enable the tested option will cause a warning.
    CommandLineOptionTest.verifySameJVMStartup(new String[] {
                    SHAOptionsBase.getWarningForUnsupportedCPU(optionName)
            }, null, ExitCode.OK,
            CommandLineOptionTest.prepareBooleanFlag(optionName, true));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:9,代码来源:UseSHAIntrinsicsSpecificTestCaseForUnsupportedSparcCPU.java

示例7: verifyWarnings

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyWarnings() throws Throwable {
    //Verify that option could be disabled without any warnings.
    CommandLineOptionTest.verifySameJVMStartup(null, new String[] {
                    SHAOptionsBase.getWarningForUnsupportedCPU(optionName)
            }, ExitCode.OK,
            CommandLineOptionTest.prepareBooleanFlag(optionName, false));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:9,代码来源:GenericTestCaseForUnsupportedAArch64CPU.java

示例8: verifyWarnings

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyWarnings() throws Throwable {
    // Verify that on non-x86 and non-SPARC CPU usage of SHA-related
    // options will not cause any warnings.
    CommandLineOptionTest.verifySameJVMStartup(null,
            new String[] { ".*" + optionName + ".*" }, ExitCode.OK,
            CommandLineOptionTest.prepareBooleanFlag(optionName, true));

    CommandLineOptionTest.verifySameJVMStartup(null,
            new String[] { ".*" + optionName + ".*" }, ExitCode.OK,
            CommandLineOptionTest.prepareBooleanFlag(optionName, false));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:13,代码来源:GenericTestCaseForOtherCPU.java

示例9: verifyWarnings

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyWarnings() throws Throwable {
    // Verify that attempt to use UseSHA option will cause a warning.
    CommandLineOptionTest.verifySameJVMStartup(new String[] {
                    SHAOptionsBase.getWarningForUnsupportedCPU(optionName)
            }, null, ExitCode.OK,
            CommandLineOptionTest.prepareBooleanFlag(optionName, true));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:9,代码来源:UseSHASpecificTestCaseForUnsupportedSparcCPU.java


注:本文中的com.oracle.java.testlibrary.cli.CommandLineOptionTest.verifySameJVMStartup方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。