public final class IntSubExceptionGenerator extends IntExceptionGenerator
Constructor and Description |
---|
IntSubExceptionGenerator(IntFormat format)
Constructs a random generator targeted at the integer addition exceptions.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkNormal(IntNumber[] operands)
Checks whether the operation does not cause exceptions.
|
boolean |
checkOverflow(IntNumber[] operands)
Checks whether the operation causes the overflow exception.
|
GeneratorResult<IntNumber> |
generateNormal(IntNumber[] operands)
Tries to generate operands that do not cause exceptions.
|
GeneratorResult<IntNumber> |
generateOverflow(IntNumber[] operands)
Tries to generate operands that cause the overflow exception.
|
check, generate
public IntSubExceptionGenerator(IntFormat format)
format
- the operand format.public boolean checkNormal(IntNumber[] operands)
IntExceptionGenerator
checkNormal
in class IntExceptionGenerator
operands
- the operation operands.true
if the operation does not cause exceptions; false
otherwise.public GeneratorResult<IntNumber> generateNormal(IntNumber[] operands)
IntExceptionGenerator
generateNormal
in class IntExceptionGenerator
operands
- the operation operands (operand[i] == null
if the i-th operation
is not fixed; otherwise operand[i]
contains the operand value).public boolean checkOverflow(IntNumber[] operands)
IntExceptionGenerator
checkOverflow
in class IntExceptionGenerator
operands
- the operation operands.true
if the operation causes the exception; false
otherwise.public GeneratorResult<IntNumber> generateOverflow(IntNumber[] operands)
IntExceptionGenerator
generateOverflow
in class IntExceptionGenerator
operands
- the operation operands (operand[i] == null
if the i-th operation
is not fixed; otherwise operand[i]
contains the operand value).