Class IntExceptionGenerator

    • Constructor Detail

      • IntExceptionGenerator

        public IntExceptionGenerator()
    • Method Detail

      • check

        public final boolean check​(IntException situation,
                                   IntNumber[] operands)
        Description copied from interface: Generator
        Checks the test data against the test situation.
        Specified by:
        check in interface Generator<IntNumber,​IntException>
        Parameters:
        situation - the test situation.
        operands - the test data.
        Returns:
        true if the test data correspond to the test situation; false otherwise.
      • checkNormal

        protected abstract boolean checkNormal​(IntNumber[] operands)
        Checks whether the operation does not cause exceptions.
        Parameters:
        operands - the operation operands.
        Returns:
        true if the operation does not cause exceptions; false otherwise.
      • generateNormal

        protected abstract GeneratorResult<IntNumber> generateNormal​(IntNumber[] operands)
        Tries to generate operands that do not cause exceptions.
        Parameters:
        operands - the operation operands (operand[i] == null if the i-th operation is not fixed; otherwise operand[i] contains the operand value).
        Returns:
        the operation operands.
      • checkOverflow

        protected abstract boolean checkOverflow​(IntNumber[] operands)
        Checks whether the operation causes the overflow exception.
        Parameters:
        operands - the operation operands.
        Returns:
        true if the operation causes the exception; false otherwise.
      • generateOverflow

        protected abstract GeneratorResult<IntNumber> generateOverflow​(IntNumber[] operands)
        Tries to generate operands that cause the overflow exception.
        Parameters:
        operands - the operation operands (operand[i] == null if the i-th operation is not fixed; otherwise operand[i] contains the operand value).
        Returns:
        the operation operands.