Package randoop.test
Class EmptyExceptionCheck
java.lang.Object
randoop.test.ExceptionCheck
randoop.test.EmptyExceptionCheck
- All Implemented Interfaces:
Check
An
ExceptionCheck
that doesn't enforce the expectation of an exception by the statement
at the statement index. Allows for execution of the statement to be either normal or throw an
exception.-
Field Summary
Fields inherited from class randoop.test.ExceptionCheck
exception, statementIndex
-
Constructor Summary
ConstructorDescriptionEmptyExceptionCheck
(Throwable exception, int statementIndex, String catchClassName) Creates an exception check for the given statement index. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Appends code for catch block behavior corresponding to expected exception.protected void
Appends code to follow the statement throwing expected exception in try block.Methods inherited from class randoop.test.ExceptionCheck
equals, getException, getExceptionName, hashCode, toCodeStringPostStatement, toCodeStringPreStatement, toString
-
Constructor Details
-
EmptyExceptionCheck
Creates an exception check for the given statement index.- Parameters:
exception
- the exception thrown by statementstatementIndex
- the position of statement in sequencecatchClassName
- the name of the exception class to be caught
-
-
Method Details
-
appendCatchBehavior
Appends code for catch block behavior corresponding to expected exception.Appends comment indicating that catch is being ignored.
- Specified by:
appendCatchBehavior
in classExceptionCheck
- Parameters:
b
- the string builder to which code text is to be added
-
appendTryBehavior
Appends code to follow the statement throwing expected exception in try block.Appends comment indicating that failure to throw exception being ignored.
- Specified by:
appendTryBehavior
in classExceptionCheck
- Parameters:
b
- the string builder to which code text is added
-