Package randoop.test

Class RegressionChecks

java.lang.Object
randoop.test.RegressionChecks
All Implemented Interfaces:
TestChecks<RegressionChecks>

public class RegressionChecks extends Object implements TestChecks<RegressionChecks>
A set of checks, including at most one ExceptionCheck.
  • Field Details

  • Constructor Details

    • RegressionChecks

      public RegressionChecks()
      Create an empty set of regression checks.
    • RegressionChecks

      public RegressionChecks(Check check)
      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 interface TestChecks<RegressionChecks>
      Returns:
      the count of checks in this object
    • add

      public void add(Check check)
      Adds the given check to the sequence.
      Specified by:
      add in interface TestChecks<RegressionChecks>
      Parameters:
      check - the check object to add to this set of checks
      Throws:
      IllegalArgumentException - if the argument's class is ExceptionCheck and this already contains such a check
    • checks

      public Set<Check> checks()
      Get all non-exception checks and whether they are passing for this object.
      Specified by:
      checks in interface TestChecks<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 interface TestChecks<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 interface TestChecks<RegressionChecks>
      Returns:
      false, since all regression checks are passing
    • getExceptionCheck

      public ExceptionCheck getExceptionCheck()
      Description copied from interface: TestChecks
      Return the exception check in this object if there is one.
      Specified by:
      getExceptionCheck in interface TestChecks<RegressionChecks>
      Returns:
      the expected exception check, null otherwise
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • commonChecks

      public RegressionChecks commonChecks(RegressionChecks other)
      Description copied from interface: TestChecks
      Returns the intersection of checks in this set and another set.
      Specified by:
      commonChecks in interface TestChecks<RegressionChecks>
      Parameters:
      other - the TestChecks 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 interface TestChecks<RegressionChecks>
      Returns:
      false, always