use of org.eclipse.collections.api.collection.primitive.ImmutableBooleanCollection in project eclipse-collections by eclipse.
the class AbstractImmutableBooleanCollectionTestCase method testNewWith.
@Test
public void testNewWith() {
ImmutableBooleanCollection immutableCollection = this.newWith();
ImmutableBooleanCollection collection = immutableCollection.newWith(true);
ImmutableBooleanCollection collection0 = immutableCollection.newWith(true).newWith(false);
ImmutableBooleanCollection collection1 = immutableCollection.newWith(true).newWith(false).newWith(true);
ImmutableBooleanCollection collection2 = immutableCollection.newWith(true).newWith(false).newWith(true).newWith(false);
ImmutableBooleanCollection collection3 = immutableCollection.newWith(true).newWith(false).newWith(true).newWith(false).newWith(true);
this.assertSizeAndOccurrences(immutableCollection, 0, 0);
this.assertSizeAndOccurrences(collection, 1, 0);
this.assertSizeAndOccurrences(collection0, 1, 1);
this.assertSizeAndOccurrences(collection1, 2, 1);
this.assertSizeAndOccurrences(collection2, 2, 2);
this.assertSizeAndOccurrences(collection3, 3, 2);
}
Aggregations