Avoid ambiguous reference to assertEquals(double, double)
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@815733 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
4d02b54690
commit
2c5a64eec4
|
@ -215,31 +215,31 @@ public class TestCollectionUtils extends MockTestCase {
|
|||
assertEquals(1, CollectionUtils.cardinality(null, list));
|
||||
{
|
||||
Map<String, Integer> freq = CollectionUtils.getCardinalityMap(list);
|
||||
assertEquals(1, freq.get(null));
|
||||
assertEquals(Integer.valueOf(1), freq.get(null));
|
||||
}
|
||||
list.add("B");
|
||||
assertEquals(1, CollectionUtils.cardinality(null, list));
|
||||
{
|
||||
Map<String, Integer> freq = CollectionUtils.getCardinalityMap(list);
|
||||
assertEquals(1, freq.get(null));
|
||||
assertEquals(Integer.valueOf(1), freq.get(null));
|
||||
}
|
||||
list.add(null);
|
||||
assertEquals(2, CollectionUtils.cardinality(null, list));
|
||||
{
|
||||
Map<String, Integer> freq = CollectionUtils.getCardinalityMap(list);
|
||||
assertEquals(2, freq.get(null));
|
||||
assertEquals(Integer.valueOf(2), freq.get(null));
|
||||
}
|
||||
list.add("B");
|
||||
assertEquals(2, CollectionUtils.cardinality(null, list));
|
||||
{
|
||||
Map<String, Integer> freq = CollectionUtils.getCardinalityMap(list);
|
||||
assertEquals(2, freq.get(null));
|
||||
assertEquals(Integer.valueOf(2), freq.get(null));
|
||||
}
|
||||
list.add(null);
|
||||
assertEquals(3, CollectionUtils.cardinality(null, list));
|
||||
{
|
||||
Map<String, Integer> freq = CollectionUtils.getCardinalityMap(list);
|
||||
assertEquals(3, freq.get(null));
|
||||
assertEquals(Integer.valueOf(3), freq.get(null));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -276,19 +276,19 @@ public class TestCollectionUtils extends MockTestCase {
|
|||
public void union() {
|
||||
Collection<Integer> col = CollectionUtils.union(iterableA, iterableC);
|
||||
Map<Integer, Integer> freq = CollectionUtils.getCardinalityMap(col);
|
||||
assertEquals(1, freq.get(1));
|
||||
assertEquals(4, freq.get(2));
|
||||
assertEquals(3, freq.get(3));
|
||||
assertEquals(4, freq.get(4));
|
||||
assertEquals(1, freq.get(5));
|
||||
assertEquals(Integer.valueOf(1), freq.get(1));
|
||||
assertEquals(Integer.valueOf(4), freq.get(2));
|
||||
assertEquals(Integer.valueOf(3), freq.get(3));
|
||||
assertEquals(Integer.valueOf(4), freq.get(4));
|
||||
assertEquals(Integer.valueOf(1), freq.get(5));
|
||||
|
||||
Collection<Number> col2 = CollectionUtils.union(collectionC2, iterableA);
|
||||
Map<Number, Integer> freq2 = CollectionUtils.getCardinalityMap(col2);
|
||||
assertEquals(1, freq2.get(1));
|
||||
assertEquals(4, freq2.get(2));
|
||||
assertEquals(3, freq2.get(3));
|
||||
assertEquals(4, freq2.get(4));
|
||||
assertEquals(1, freq2.get(5));
|
||||
assertEquals(Integer.valueOf(1), freq2.get(1));
|
||||
assertEquals(Integer.valueOf(4), freq2.get(2));
|
||||
assertEquals(Integer.valueOf(3), freq2.get(3));
|
||||
assertEquals(Integer.valueOf(4), freq2.get(4));
|
||||
assertEquals(Integer.valueOf(1), freq2.get(5));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -296,17 +296,17 @@ public class TestCollectionUtils extends MockTestCase {
|
|||
Collection<Integer> col = CollectionUtils.intersection(iterableA, iterableC);
|
||||
Map<Integer, Integer> freq = CollectionUtils.getCardinalityMap(col);
|
||||
assertNull(freq.get(1));
|
||||
assertEquals(2, freq.get(2));
|
||||
assertEquals(3, freq.get(3));
|
||||
assertEquals(2, freq.get(4));
|
||||
assertEquals(Integer.valueOf(2), freq.get(2));
|
||||
assertEquals(Integer.valueOf(3), freq.get(3));
|
||||
assertEquals(Integer.valueOf(2), freq.get(4));
|
||||
assertNull(freq.get(5));
|
||||
|
||||
Collection<Number> col2 = CollectionUtils.intersection(collectionC2, collectionA);
|
||||
Map<Number, Integer> freq2 = CollectionUtils.getCardinalityMap(col2);
|
||||
assertNull(freq2.get(1));
|
||||
assertEquals(2, freq2.get(2));
|
||||
assertEquals(3, freq2.get(3));
|
||||
assertEquals(2, freq2.get(4));
|
||||
assertEquals(Integer.valueOf(2), freq2.get(2));
|
||||
assertEquals(Integer.valueOf(3), freq2.get(3));
|
||||
assertEquals(Integer.valueOf(2), freq2.get(4));
|
||||
assertNull(freq2.get(5));
|
||||
}
|
||||
|
||||
|
@ -314,11 +314,11 @@ public class TestCollectionUtils extends MockTestCase {
|
|||
public void disjunction() {
|
||||
Collection<Integer> col = CollectionUtils.disjunction(iterableA, iterableC);
|
||||
Map<Integer, Integer> freq = CollectionUtils.getCardinalityMap(col);
|
||||
assertEquals(1, freq.get(1));
|
||||
assertEquals(2, freq.get(2));
|
||||
assertEquals(Integer.valueOf(1), freq.get(1));
|
||||
assertEquals(Integer.valueOf(2), freq.get(2));
|
||||
assertNull(freq.get(3));
|
||||
assertEquals(2, freq.get(4));
|
||||
assertEquals(1, freq.get(5));
|
||||
assertEquals(Integer.valueOf(2), freq.get(4));
|
||||
assertEquals(Integer.valueOf(1), freq.get(5));
|
||||
|
||||
Collection<Number> col2 = CollectionUtils.disjunction(collectionC2, collectionA);
|
||||
Map<Number, Integer> freq2 = CollectionUtils.getCardinalityMap(col2);
|
||||
|
|
Loading…
Reference in New Issue