diff options
Diffstat (limited to 'guava-testlib/src/com/google/common/testing/EqualsTester.java')
-rw-r--r-- | guava-testlib/src/com/google/common/testing/EqualsTester.java | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/guava-testlib/src/com/google/common/testing/EqualsTester.java b/guava-testlib/src/com/google/common/testing/EqualsTester.java index 50b58c3..4ee69bf 100644 --- a/guava-testlib/src/com/google/common/testing/EqualsTester.java +++ b/guava-testlib/src/com/google/common/testing/EqualsTester.java @@ -47,13 +47,12 @@ import java.util.List; * <ul> * <li>comparing each object against itself returns true * <li>comparing each object against null returns false - * <li>comparing each object against an instance of an incompatible class - * returns false + * <li>comparing each object an instance of an incompatible class returns false * <li>comparing each pair of objects within the same equality group returns * true * <li>comparing each pair of objects from different equality groups returns * false - * <li>the hash codes of any two equal objects are equal + * <li>the hash code of any two equal objects are equal * </ul> * * <p>When a test fails, the error message labels the objects involved in @@ -76,7 +75,6 @@ public final class EqualsTester { private static final int REPETITIONS = 3; private final List<List<Object>> equalityGroups = Lists.newArrayList(); - private RelationshipTester.ItemReporter itemReporter = new RelationshipTester.ItemReporter(); /** * Constructs an empty EqualsTester instance @@ -112,7 +110,7 @@ public final class EqualsTester { // RelationshipAssertions in general) accept null inputs? assertTrue("$ITEM must be unequal to $UNRELATED", !Objects.equal(item, unrelated)); } - }, itemReporter); + }); for (List<Object> group : equalityGroups) { delegate.addRelatedGroup(group); } @@ -123,11 +121,6 @@ public final class EqualsTester { return this; } - EqualsTester setItemReporter(RelationshipTester.ItemReporter reporter) { - this.itemReporter = checkNotNull(reporter); - return this; - } - private void testItems() { for (Object item : Iterables.concat(equalityGroups)) { assertTrue(item + " must be unequal to null", !item.equals(null)); |