randoop.util
Class InformationalComparator<T>

Object
  extended by InformationalComparator<T>

public class InformationalComparator<T>
extends Object

Compares two SimpleLists for member-wise equality, e.g. two lists l1 and l2 are equals if they have the same size and at every valid index i, l1.get(i).equals(l2.get(i))==true. The compare method returns a ComparisonResult, which in addition to returning the boolean result of the comparison, also returns a message explaining the result, such as the first index at which the collections differ, the toString() representation of the first differing elements, etc.


Nested Class Summary
Modifier and Type Class and Description
static class InformationalComparator.ComparisonResult
          Communicates the result of the comparison, and also a message describing the result.
 
Constructor Summary
Constructor and Description
InformationalComparator()
           
 
Method Summary
Modifier and Type Method and Description
 InformationalComparator.ComparisonResult compare(String l1Name, SimpleList<T> l1, String l2Name, SimpleList<T> l2)
          Compares two lists for equality.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InformationalComparator

public InformationalComparator()
Method Detail

compare

public InformationalComparator.ComparisonResult compare(String l1Name,
                                                        SimpleList<T> l1,
                                                        String l2Name,
                                                        SimpleList<T> l2)
Compares two lists for equality.