Class IntSubExceptionGenerator

    • Constructor Detail

      • IntSubExceptionGenerator

        public IntSubExceptionGenerator​(IntFormat format)
        Constructs a random generator targeted at the integer addition exceptions.
        Parameters:
        format - the operand format.
    • Method Detail

      • checkNormal

        public boolean checkNormal​(IntNumber[] operands)
        Description copied from class: IntExceptionGenerator
        Checks whether the operation does not cause exceptions.
        Specified by:
        checkNormal in class IntExceptionGenerator
        Parameters:
        operands - the operation operands.
        Returns:
        true if the operation does not cause exceptions; false otherwise.
      • generateNormal

        public GeneratorResult<IntNumber> generateNormal​(IntNumber[] operands)
        Description copied from class: IntExceptionGenerator
        Tries to generate operands that do not cause exceptions.
        Specified by:
        generateNormal in class IntExceptionGenerator
        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

        public boolean checkOverflow​(IntNumber[] operands)
        Description copied from class: IntExceptionGenerator
        Checks whether the operation causes the overflow exception.
        Specified by:
        checkOverflow in class IntExceptionGenerator
        Parameters:
        operands - the operation operands.
        Returns:
        true if the operation causes the exception; false otherwise.
      • generateOverflow

        public GeneratorResult<IntNumber> generateOverflow​(IntNumber[] operands)
        Description copied from class: IntExceptionGenerator
        Tries to generate operands that cause the overflow exception.
        Specified by:
        generateOverflow in class IntExceptionGenerator
        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.