Java Code Examples for com.oracle.testlibrary.jsr292.Helper#TEST_LIMIT

The following examples show how to use com.oracle.testlibrary.jsr292.Helper#TEST_LIMIT . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CatchExceptionTest.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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;
}
 
Example 2
Source File: CatchExceptionTest.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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;
}
 
Example 3
Source File: CatchExceptionTest.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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;
}
 
Example 4
Source File: CatchExceptionTest.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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;
}
 
Example 5
Source File: CatchExceptionTest.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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;
}
 
Example 6
Source File: CatchExceptionTest.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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;
}
 
Example 7
Source File: CatchExceptionTest.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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;
}
 
Example 8
Source File: CatchExceptionTest.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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;
}
 
Example 9
Source File: CatchExceptionTest.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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;
}
 
Example 10
Source File: CatchExceptionTest.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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;
}
 
Example 11
Source File: CatchExceptionTest.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
/**
 * @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;
}