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


Java CommandLineOptionTest.verifyOptionValueForSameVM方法代码示例

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


在下文中一共展示了CommandLineOptionTest.verifyOptionValueForSameVM方法的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: verifyOptionValues

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyOptionValues() throws Throwable {
    // Verify that on supported CPU option is enabled by default.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "true");

    // Verify that it is possible to explicitly enable the option.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "true",
            CommandLineOptionTest.prepareBooleanFlag(optionName, true));

    // Verify that it is possible to explicitly disable the option.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false",
            CommandLineOptionTest.prepareBooleanFlag(optionName, false));

    // verify that option is disabled when -UseSHA was passed to JVM.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false",
            CommandLineOptionTest.prepareBooleanFlag(optionName, true),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA_OPTION, false));

    // Verify that it is possible to explicitly disable the tested option
    // even if +UseSHA was passed to JVM.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false",
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA_OPTION, true),
            CommandLineOptionTest.prepareBooleanFlag(optionName, false));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:27,代码来源:GenericTestCaseForSupportedSparcCPU.java

示例3: verifyOptionValues

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyOptionValues() throws Throwable {
    // Verify that UseSHA option remains disabled even if all
    // UseSHA*Intrincs options were enabled.
    CommandLineOptionTest.verifyOptionValueForSameVM(
            SHAOptionsBase.USE_SHA_OPTION, "false",
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA1_INTRINSICS_OPTION, true),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA256_INTRINSICS_OPTION, true),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA512_INTRINSICS_OPTION, true));

    // Verify that UseSHA option remains disabled even if all
    // UseSHA*Intrincs options were enabled and UseSHA was enabled as well.
    CommandLineOptionTest.verifyOptionValueForSameVM(
            SHAOptionsBase.USE_SHA_OPTION, "false",
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA_OPTION, true),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA1_INTRINSICS_OPTION, true),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA256_INTRINSICS_OPTION, true),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA512_INTRINSICS_OPTION, true));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:27,代码来源:UseSHASpecificTestCaseForUnsupportedSparcCPU.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: runX86SupportedVMTestCases

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void runX86SupportedVMTestCases() throws Throwable {
    super.verifyJVMStartup();
    // verify default value
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName,
            defaultValue);
    // verify that until RTMLocking is not used, value
    // will be set to default false.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName,
            defaultValue, "-XX:+UseRTMDeopt");
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:12,代码来源:TestUseRTMDeoptOptionOnUnsupportedConfig.java

示例6: verifyOptionValues

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyOptionValues() throws Throwable {
    // Verify that the tested option is disabled by default.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false");

    // Verify that it is not possible to explicitly enable the option.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false",
            CommandLineOptionTest.prepareBooleanFlag(optionName, true));

    // Verify that the tested option is disabled even if +UseSHA was passed
    // to JVM.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false",
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA_OPTION, true));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:16,代码来源:GenericTestCaseForUnsupportedX86CPU.java

示例7: verifyOptionValues

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyOptionValues() throws Throwable {
    // Verify that UseSHA is disabled when all UseSHA*Intrinscs are
    // disabled.
    CommandLineOptionTest.verifyOptionValueForSameVM(
            SHAOptionsBase.USE_SHA_OPTION, "false",
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA1_INTRINSICS_OPTION, false),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA256_INTRINSICS_OPTION, false),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA512_INTRINSICS_OPTION, false));

    CommandLineOptionTest.verifyOptionValueForSameVM(
            // Verify that UseSHA is disabled when all UseSHA*Intrinscs are
            // disabled even if it was explicitly enabled.
            SHAOptionsBase.USE_SHA_OPTION, "false",
            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));

    // Verify that explicitly disabled UseSHA option remains disabled even
    // if all UseSHA*Intrinsics options were enabled.
    CommandLineOptionTest.verifyOptionValueForSameVM(
            SHAOptionsBase.USE_SHA_OPTION, "false",
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA_OPTION, false),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA1_INTRINSICS_OPTION, true),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA256_INTRINSICS_OPTION, true),
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA512_INTRINSICS_OPTION, true));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:40,代码来源:UseSHASpecificTestCaseForSupportedSparcCPU.java

示例8: verifyOptionValues

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyOptionValues() throws Throwable {
    // Verify that option is disabled by default.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false");

    // Verify that option is disabled even if it was explicitly enabled
    // using CLI options.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false",
            CommandLineOptionTest.prepareBooleanFlag(optionName, true));

    // Verify that option is disabled when +UseSHA was passed to JVM.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false",
            CommandLineOptionTest.prepareBooleanFlag(
                    SHAOptionsBase.USE_SHA_OPTION, true));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:16,代码来源:GenericTestCaseForUnsupportedAArch64CPU.java

示例9: verifyOptionValues

import com.oracle.java.testlibrary.cli.CommandLineOptionTest; //导入方法依赖的package包/类
@Override
protected void verifyOptionValues() throws Throwable {
    // Verify that option is disabled by default.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false");

    // Verify that option is disabled even if it was explicitly enabled
    // using CLI options.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false",
            CommandLineOptionTest.prepareBooleanFlag(optionName, true));

    // Verify that option is disabled when it explicitly disabled
    // using CLI options.
    CommandLineOptionTest.verifyOptionValueForSameVM(optionName, "false",
            CommandLineOptionTest.prepareBooleanFlag(optionName, false));
}
 
开发者ID:ojdkbuild,项目名称:lookaside_java-1.8.0-openjdk,代码行数:16,代码来源:GenericTestCaseForOtherCPU.java


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