Rework test fixtures

Next, grow the amount of data tested to find bugs in the tests with
non-repeatable map ordering
This commit is contained in:
Gary Gregory 2024-03-31 09:52:52 -04:00
parent 52cdb17e69
commit 817180b4da
1 changed files with 6 additions and 1 deletions

View File

@ -804,7 +804,12 @@ public abstract class AbstractMultiValuedMapTest<K, V> extends AbstractObjectTes
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
public void testContainsValue_Key() { public void testContainsValue_Key() {
final MultiValuedMap<K, V> map = makeFullMap(); final MultiValuedMap<K, V> map = makeFullMap();
assertTrue(map.containsMapping("k0", "v0_1")); final int maxK = getSampleKeySize();
final int maxV = getSampleCountPerKey();
for (int k = 0; k < maxK; k++) {
for (int v = 0; v < maxV; v++) {
assertTrue(map.containsMapping(makeKey(k), makeValue(k, v))); }
}
assertFalse(map.containsMapping("k1", "2")); assertFalse(map.containsMapping("k1", "2"));
if (!isAddSupported()) { if (!isAddSupported()) {
return; return;