Package randoop.test
Class RegressionChecks
java.lang.Object
randoop.test.RegressionChecks
- All Implemented Interfaces:
TestChecks<RegressionChecks>
A set of checks, including at most one ExceptionCheck.
-
Field Summary
Modifier and TypeFieldDescriptionstatic RegressionChecks
An empty, immutable set of regression checks.private ExceptionCheck
-
Constructor Summary
ConstructorDescriptionCreate an empty set of regression checks.RegressionChecks
(Check check) Create a singleton set of regression checks. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds the given check to the sequence.checks()
Get all non-exception checks and whether they are passing for this object.commonChecks
(RegressionChecks other) Returns the intersection of checks in this set and another set.int
count()
Return the number of checks in this test.boolean
Return the exception check in this object if there is one.boolean
Indicates whether this object has checks.boolean
Indicate whether this object has any failing checks.int
hashCode()
boolean
Indicates whether this set of checks contains any invalid behaviors.
-
Field Details
-
EMPTY
An empty, immutable set of regression checks. -
checks
-
exceptionCheck
-
-
Constructor Details
-
RegressionChecks
public RegressionChecks()Create an empty set of regression checks. -
RegressionChecks
Create a singleton set of regression checks.- Parameters:
check
- the check to put in the newly-created singleton set
-
-
Method Details
-
count
public int count()Description copied from interface:TestChecks
Return the number of checks in this test.- Specified by:
count
in interfaceTestChecks<RegressionChecks>
- Returns:
- the count of checks in this object
-
add
Adds the given check to the sequence.- Specified by:
add
in interfaceTestChecks<RegressionChecks>
- Parameters:
check
- the check object to add to this set of checks- Throws:
IllegalArgumentException
- if the argument's class isExceptionCheck
and this already contains such a check
-
checks
Get all non-exception checks and whether they are passing for this object.- Specified by:
checks
in interfaceTestChecks<RegressionChecks>
- Returns:
- map of non-exception checks in this object. each mapped to true, indicating it is passing
-
hasChecks
public boolean hasChecks()Indicates whether this object has checks.- Specified by:
hasChecks
in interfaceTestChecks<RegressionChecks>
- Returns:
- true if there are regression checks or an expected exception, false otherwise
-
hasErrorBehavior
public boolean hasErrorBehavior()Indicate whether this object has any failing checks. (This is essentially asking whether this is an error revealing test.)- Specified by:
hasErrorBehavior
in interfaceTestChecks<RegressionChecks>
- Returns:
- false, since all regression checks are passing
-
getExceptionCheck
Description copied from interface:TestChecks
Return the exception check in this object if there is one.- Specified by:
getExceptionCheck
in interfaceTestChecks<RegressionChecks>
- Returns:
- the expected exception check, null otherwise
-
equals
-
hashCode
public int hashCode() -
commonChecks
Description copied from interface:TestChecks
Returns the intersection of checks in this set and another set.- Specified by:
commonChecks
in interfaceTestChecks<RegressionChecks>
- Parameters:
other
- theTestChecks
to compare with- Returns:
- the checks common to this set of checks and those in
other
-
hasInvalidBehavior
public boolean hasInvalidBehavior()Indicates whether this set of checks contains any invalid behaviors.Returns false because regression checks are not invalid.
- Specified by:
hasInvalidBehavior
in interfaceTestChecks<RegressionChecks>
- Returns:
- false, always
-