Search in sources :

Example 1 with ImmutableShortBag

use of org.eclipse.collections.api.bag.primitive.ImmutableShortBag in project eclipse-collections by eclipse.

the class ImmutableBagTestCase method collectShort.

@Override
@Test
public void collectShort() {
    super.collectShort();
    ImmutableShortBag result = this.newBag().collectShort(Short::parseShort);
    Assert.assertEquals(this.numKeys(), result.sizeDistinct());
    for (int i = 1; i <= this.numKeys(); i++) {
        Assert.assertEquals(i, result.occurrencesOf((short) i));
    }
}
Also used : ImmutableShortBag(org.eclipse.collections.api.bag.primitive.ImmutableShortBag) Test(org.junit.Test)

Aggregations

ImmutableShortBag (org.eclipse.collections.api.bag.primitive.ImmutableShortBag)1 Test (org.junit.Test)1