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


Java Helper.IS_THOROUGH属性代码示例

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


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

示例1: TestFactory

public TestFactory() {
    if (Helper.IS_THOROUGH) {
        maxArgs = maxDrops = CatchExceptionTest.MAX_ARITY;
    } else {
        maxArgs = MIN_TESTED_ARITY
                + Helper.RNG.nextInt(CatchExceptionTest.MAX_ARITY
                        - MIN_TESTED_ARITY)
                + 1;
        maxDrops = MIN_TESTED_ARITY
                + Helper.RNG.nextInt(maxArgs - MIN_TESTED_ARITY)
                + 1;
        args = 1;
    }

    System.out.printf("maxArgs = %d%nmaxDrops = %d%n", maxArgs, maxDrops);
    constructorSize = TestCase.CONSTRUCTORS.size();
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:17,代码来源:CatchExceptionTest.java

示例2: createTest

private CatchExceptionTest createTest() {
    if (!Helper.IS_THOROUGH) {
        return new CatchExceptionTest(
                TestCase.CONSTRUCTORS.get(constructor++).get(),
                Helper.RNG.nextBoolean(), args, dropArgs);
    } else {
        if (isVararg) {
            isVararg = false;
            return new CatchExceptionTest(
                    TestCase.CONSTRUCTORS.get(constructor++).get(),
                    isVararg, args, dropArgs);
        } else {
            isVararg = true;
            return new CatchExceptionTest(
                    TestCase.CONSTRUCTORS.get(constructor).get(),
                    isVararg, args, dropArgs);
        }
    }
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:19,代码来源:CatchExceptionTest.java

示例3: createTest

private CatchExceptionTest createTest() {
    if (!Helper.IS_THOROUGH) {
        return new CatchExceptionTest(
                TestCase.CONSTRUCTORS.get(constructor++).get(),
                Helper.RNG.nextBoolean(), args, dropArgs);
    } else {
       if (isVararg) {
           isVararg = false;
           return new CatchExceptionTest(
                   TestCase.CONSTRUCTORS.get(constructor++).get(),
                   isVararg, args, dropArgs);
       } else {
           isVararg = true;
           return new CatchExceptionTest(
                   TestCase.CONSTRUCTORS.get(constructor).get(),
                   isVararg, args, dropArgs);
       }
    }
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:19,代码来源:CatchExceptionTest.java

示例4: TestFactory

public TestFactory() {
    if (Helper.IS_THOROUGH) {
        maxArgs = maxDrops = CatchExceptionTest.MAX_ARITY;
    } else {
        maxArgs = MIN_TESTED_ARITY
                + Helper.RNG.nextInt(CatchExceptionTest.MAX_ARITY
                        - MIN_TESTED_ARITY)
                + 1;
        maxDrops = MIN_TESTED_ARITY
                + Helper.RNG.nextInt(maxArgs - MIN_TESTED_ARITY)
                + 1;
        args = 1;
    }

    if (Helper.IS_VERBOSE) {
        System.out.printf("maxArgs = %d%nmaxDrops = %d%n",
                maxArgs, maxDrops);
    }
    constructorSize = TestCase.CONSTRUCTORS.size();
}
 
开发者ID:infobip,项目名称:infobip-open-jdk-8,代码行数:20,代码来源:CatchExceptionTest.java

示例5: nextTest

/**
 * @return next test from test matrix: {varArgs, noVarArgs} x
 * TestCase.rtypes x TestCase.THROWABLES x {1, .., maxArgs } x
 * {0, .., maxDrops}
 */
public CatchExceptionTest nextTest() {
    if (constructor < constructorSize) {
        return createTest();
    }
    constructor = 0;
    count++;
    if (!Helper.IS_THOROUGH && count > Helper.TEST_LIMIT) {
        System.out.println("test limit is exceeded");
        return null;
    }
    if (dropArgs <= currentMaxDrops) {
        if (dropArgs == 0) {
            if (Helper.IS_THOROUGH || Helper.RNG.nextBoolean()) {
                ++dropArgs;
                return createTest();
            } else if (Helper.IS_VERBOSE) {
                System.out.printf(
                        "argsCount=%d : \"drop\" scenarios are skipped%n",
                        args);
            }
        } else {
            ++dropArgs;
            return createTest();
        }
    }

    if (args < maxArgs) {
        dropArgs = 0;
        currentMaxDrops = Math.min(args, maxDrops);
        ++args;
        return createTest();
    }
    return null;
}
 
开发者ID:lambdalab-mirror,项目名称:jdk8u-jdk,代码行数:39,代码来源:CatchExceptionTest.java

示例6: nextTest

/**
 * @return next test from test matrix:
 * {varArgs, noVarArgs} x TestCase.rtypes x TestCase.THROWABLES x {1, .., maxArgs } x {0, .., maxDrops}
 */
public CatchExceptionTest nextTest() {
    if (constructor < constructorSize) {
        return createTest();
    }
    constructor = 0;
    count++;
    if (!Helper.IS_THOROUGH && count > Helper.TEST_LIMIT) {
        System.out.println("test limit is exceeded");
        return null;
    }
    if (dropArgs <= currentMaxDrops) {
        if (dropArgs == 0) {
            if (Helper.IS_THOROUGH || Helper.RNG.nextBoolean()) {
                ++dropArgs;
                return createTest();
            } else if (Helper.IS_VERBOSE) {
                System.out.printf(
                        "argsCount=%d : \"drop\" scenarios are skipped%n",
                        args);
            }
        } else {
            ++dropArgs;
            return createTest();
        }
    }

    if (args < maxArgs) {
        dropArgs = 0;
        currentMaxDrops = Math.min(args, maxDrops);
        ++args;
        return createTest();
    }
    return null;
}
 
开发者ID:campolake,项目名称:openjdk9,代码行数:38,代码来源:CatchExceptionTest.java

示例7: nextTest

/**
 * @return next test from test matrix:
 * {varArgs, noVarArgs} x TestCase.rtypes x TestCase.THROWABLES x {1, .., maxArgs } x {1, .., maxDrops}
 */
public CatchExceptionTest nextTest() {
    if (constructor < constructorSize) {
        return createTest();
    }
    constructor = 0;
    count++;
    if (!Helper.IS_THOROUGH && count > Helper.TEST_LIMIT) {
        System.out.println("test limit is exceeded");
        return null;
    }
    if (dropArgs <= currentMaxDrops) {
        if (dropArgs == 1) {
            if (Helper.IS_THOROUGH || Helper.RNG.nextBoolean()) {
                ++dropArgs;
                return createTest();
            } else if (Helper.IS_VERBOSE) {
                System.out.printf(
                        "argsCount=%d : \"drop\" scenarios are skipped%n",
                        args);
            }
        } else {
            ++dropArgs;
            return createTest();
        }
    }

    if (args <= maxArgs) {
        dropArgs = 1;
        currentMaxDrops = Math.min(args, maxDrops);
        ++args;
        return createTest();
    }
    return null;
}
 
开发者ID:infobip,项目名称:infobip-open-jdk-8,代码行数:38,代码来源:CatchExceptionTest.java


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