use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method add.
@Test(expected = UnsupportedOperationException.class)
public void add() {
LongList emptyList = LongCollections.emptyList();
emptyList.add(0L);
}
use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method retainAll_null.
@Test(expected = NullPointerException.class)
public void retainAll_null() {
LongList emptyList = LongCollections.emptyList();
emptyList.retainAll(null);
}
use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method toArray_empty.
@Test
public void toArray_empty() {
LongList emptyList = LongCollections.emptyList();
long[] array = emptyList.toArray();
assertEquals("Array should be empty for empty lists.", 0, array.length);
}
use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method iterator_empty.
@Test
public void iterator_empty() {
LongList emptyList = LongCollections.emptyList();
LongIterator itr = emptyList.iterator();
assertFalse("Iterator should indicate that there are no elements.", itr.hasNext());
}
use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method containsAll_same.
@Test
public void containsAll_same() {
LongList emptyList = LongCollections.emptyList();
LongList otherList = LongCollections.emptyList();
assertTrue("First list should contain all elements from second list.", emptyList.containsAll(otherList));
assertTrue("Second list should contain all elements from first list.", otherList.containsAll(emptyList));
}
Aggregations