Package randoop.test
Class MissingExceptionCheck
java.lang.Object
randoop.test.MissingExceptionCheck
- All Implemented Interfaces:
Check
Represents the fact that a statement should throw an exception, but did not. It is used in an
error-revealing test to indicate that normal execution of the statement violates the stated
throws-condition of the method/constructor.
-
Field Summary
Modifier and TypeFieldDescriptionprivate final List<List<ThrowsClause>>
The list of lists of throws clauses for which the guard expression was satisfied.private final int
The index of the statement where the exception should be thrown. -
Constructor Summary
ConstructorDescriptionMissingExceptionCheck
(List<List<ThrowsClause>> expected, int index) Creates aMissingExceptionCheck
object for the expected exception type at the given statement. -
Method Summary
-
Field Details
-
expected
The list of lists of throws clauses for which the guard expression was satisfied. Each list of throwsclauses represents one specification, and each such list must be satisfied. -
index
private final int indexThe index of the statement where the exception should be thrown.
-
-
Constructor Details
-
MissingExceptionCheck
MissingExceptionCheck(List<List<ThrowsClause>> expected, int index) Creates aMissingExceptionCheck
object for the expected exception type at the given statement.- Parameters:
expected
- the expected exceptionsindex
- the statement index
-
-
Method Details
-
equals
-
hashCode
public int hashCode() -
toString
-
toCodeStringPreStatement
Description copied from interface:Check
Returns a string of Java source code to be emitted before a statement containing this check.- Specified by:
toCodeStringPreStatement
in interfaceCheck
- Returns:
- the string to be included before the statement
-
toCodeStringPostStatement
Description copied from interface:Check
Returns a string of Java source code to be emitted after a statement containing this check.- Specified by:
toCodeStringPostStatement
in interfaceCheck
- Returns:
- the string to be included following the statement
-