Skip to content

Commit

Permalink
Rework test fixtures
Browse files Browse the repository at this point in the history
Next, grow the amount of data tested to find bugs in the tests with
non-repeatable map ordering
  • Loading branch information
garydgregory committed Mar 30, 2024
1 parent feccdaf commit 8a8c87c
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -871,7 +871,7 @@ public void testKeysBagIterator() {
assertEquals(2, bag.getCount("k0"));
assertEquals(2, bag.getCount("k1"));
assertEquals(2, bag.getCount("k2"));
assertEquals(6, bag.size());
assertEquals(getSampleSize(), bag.size());
}

@Test
Expand All @@ -888,7 +888,7 @@ public void testKeysMultiSet() {
assertEquals(2, keyMultiSet.getCount("k1"));
assertEquals(2, keyMultiSet.getCount("k2"));
assertEquals(0, keyMultiSet.getCount("conut"));
assertEquals(6, keyMultiSet.size());
assertEquals(getSampleSize(), keyMultiSet.size());
}

@Test
Expand Down Expand Up @@ -1150,7 +1150,7 @@ public void testRemoveMappingThroughGet() {
@SuppressWarnings("unchecked")
Collection<V> col = map.get((K) "k0");
assertEquals(2, col.size());
assertEquals(6, map.size());
assertEquals(getSampleSize(), map.size());
assertTrue(col.remove("v0_a"));
assertTrue(col.remove("v0_b"));
assertFalse(map.containsKey("k0"));
Expand Down Expand Up @@ -1203,7 +1203,7 @@ public void testRemoveViaValuesRemove() {

@Test
public void testSize() {
assertEquals(6, makeFullMap().size());
assertEquals(getSampleSize(), makeFullMap().size());
}

@Test
Expand Down Expand Up @@ -1303,7 +1303,7 @@ public void testValues() {
expected.add((V) "v2_a");
expected.add((V) "v2_b");
final Collection<V> c = map.values();
assertEquals(6, c.size());
assertEquals(getSampleSize(), c.size());
assertEquals(expected, new HashSet<>(c));
}

Expand Down

0 comments on commit 8a8c87c

Please sign in to comment.