use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method equals_false.
@Test
public void equals_false() {
LongList emptyList = LongCollections.emptyList();
LongList otherList = PrimitiveLists.newLongArrayList();
otherList.add(0L);
otherList.add(1L);
otherList.add(2L);
assertFalse("First list should not be equal to second list.", emptyList.equals(otherList));
assertFalse("Second list should not 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 removeAll_opposite.
@Test
public void removeAll_opposite() {
LongList emptyList = LongCollections.emptyList();
LongList otherList = PrimitiveLists.newLongArrayList(0L, 5L, 10L);
otherList.removeAll(emptyList);
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 toString_empty.
@Test
public void toString_empty() {
LongList emptyList = LongCollections.emptyList();
assertEquals("ToString output should be [] for the empty list.", "[]", emptyList.toString());
}
use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method create.
@Test
public void create() {
LongList emptyList = LongCollections.emptyList();
assertEquals("Long list size should be 0.", 0, emptyList.size());
assertTrue("Long list should be empty.", emptyList.isEmpty());
}
use of com.b2international.collections.longs.LongList in project snow-owl by b2ihealthcare.
the class EmptyLongListTest method removeAll_empty_list.
@Test
public void removeAll_empty_list() {
LongList emptyList = LongCollections.emptyList();
LongList otherList = LongCollections.emptyList();
emptyList.removeAll(otherList);
assertEquals("Long list size should be 0.", 0, emptyList.size());
}
Aggregations