use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method removeAll.
@Test
public void removeAll() {
LongList emptyList = LongCollections.emptyList();
LongList otherList = PrimitiveLists.newLongArrayList(0L, 5L, 10L);
emptyList.removeAll(otherList);
assertEquals("Empty list should remain empty.", 0, emptyList.size());
assertTrue("Non-empty list should not change.", otherList.get(0) == 0L && otherList.get(1) == 5L && otherList.get(2) == 10L && otherList.size() == 3);
}
use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method equals_true.
@Test
public void equals_true() {
LongList emptyList = LongCollections.emptyList();
LongList otherList = LongCollections.emptyList();
assertTrue("First list should be equal to second list.", emptyList.equals(otherList));
assertTrue("Second list should be equal to first list.", otherList.equals(emptyList));
}
use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method iterator_overrun.
@Test(expected = NoSuchElementException.class)
public void iterator_overrun() {
LongList emptyList = LongCollections.emptyList();
LongIterator itr = emptyList.iterator();
itr.next();
}
use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method equals_true_different_types.
@Test
public void equals_true_different_types() {
LongList emptyList = LongCollections.emptyList();
LongList otherList = PrimitiveLists.newLongArrayList();
assertTrue("First list should be equal to second list.", emptyList.equals(otherList));
assertTrue("Second list should be equal to first list.", otherList.equals(emptyList));
}
use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method addAll.
@Test(expected = UnsupportedOperationException.class)
public void addAll() {
LongList emptyList = LongCollections.emptyList();
LongList otherList = PrimitiveLists.newLongArrayList(1L, 2L, 3L);
emptyList.addAll(otherList);
}
Aggregations