public abstract class FpExceptionGenerator extends java.lang.Object implements Generator<FpNumber,FpException>
Constructor and Description |
---|
FpExceptionGenerator() |
Modifier and Type | Method and Description |
---|---|
boolean |
check(FpException situation,
FpNumber[] operands)
Checks the test data against the test situation.
|
protected abstract boolean |
checkInexact(FpNumber[] operands)
Checks whether the operation causes the inexact exception.
|
protected abstract boolean |
checkNormal(FpNumber[] operands)
Checks whether the operation does not cause exceptions.
|
protected abstract boolean |
checkOverflow(FpNumber[] operands)
Checks whether the operation causes the overflow exception.
|
protected abstract boolean |
checkUnderflow(FpNumber[] operands) |
GeneratorResult<FpNumber> |
generate(FpException situation,
FpNumber[] operands)
Generates test data for the given test situation.
|
protected abstract GeneratorResult<FpNumber> |
generateInexact(FpNumber[] operands)
Tries to generate operands that cause the inexact exception.
|
protected abstract GeneratorResult<FpNumber> |
generateNormal(FpNumber[] operands)
Tries to generate operands that do not cause exceptions.
|
protected abstract GeneratorResult<FpNumber> |
generateOverflow(FpNumber[] operands)
Tries to generate operands that cause the overflow exception.
|
protected abstract GeneratorResult<FpNumber> |
generateUnderflow(FpNumber[] operands)
Tries to generate operands that cause the underflow exception.
|
public final boolean check(FpException situation, FpNumber[] operands)
Generator
check
in interface Generator<FpNumber,FpException>
situation
- the test situation.operands
- the test data.true
if the test data correspond to the test situation;
false
otherwise.public final GeneratorResult<FpNumber> generate(FpException situation, FpNumber[] operands)
Generator
generate
in interface Generator<FpNumber,FpException>
situation
- the test situation.operands
- the test data having been fixed.protected abstract boolean checkNormal(FpNumber[] operands)
operands
- the operation operands.true
if the operation does not cause exceptions; false
otherwise.protected abstract GeneratorResult<FpNumber> generateNormal(FpNumber[] operands)
operands
- the operation operands (operand[i] == null
if the i-th operation
is not fixed; otherwise operand[i]
contains the operand value).protected abstract boolean checkOverflow(FpNumber[] operands)
operands
- the operation operands.true
if the operation causes the exception; false
otherwise.protected abstract GeneratorResult<FpNumber> generateOverflow(FpNumber[] operands)
operands
- the operation operands (operand[i] == null
if the i-th operation
is not fixed; otherwise operand[i]
contains the operand value).protected abstract boolean checkUnderflow(FpNumber[] operands)
protected abstract GeneratorResult<FpNumber> generateUnderflow(FpNumber[] operands)
operands
- the operation operands (operand[i] == null
if the i-th operation
is not fixed; otherwise operand[i]
contains the operand value).protected abstract boolean checkInexact(FpNumber[] operands)
operands
- the operation operands.true
if the operation causes the exception; false
otherwise.protected abstract GeneratorResult<FpNumber> generateInexact(FpNumber[] operands)
operands
- the operation operands (operand[i] == null
if the i-th operation
is not fixed; otherwise operand[i]
contains the operand value).