use of org.eclipse.collections.api.set.primitive.MutableLongSet in project mapdb by jankotek.
the class AbstractLongSetTestCase method add.
@Override
@Test
public void add() {
super.add();
MutableLongSet set = this.newWith();
Assert.assertTrue(set.add(14L));
Assert.assertFalse(set.add(14L));
Assert.assertTrue(set.add(2L));
Assert.assertFalse(set.add(2L));
Assert.assertTrue(set.add(35L));
Assert.assertFalse(set.add(35L));
Assert.assertTrue(set.add(31L));
Assert.assertFalse(set.add(31L));
Assert.assertTrue(set.add(32L));
Assert.assertFalse(set.add(32L));
Assert.assertTrue(set.add(0L));
Assert.assertFalse(set.add(0L));
Assert.assertTrue(set.add(1L));
Assert.assertFalse(set.add(1L));
}
use of org.eclipse.collections.api.set.primitive.MutableLongSet in project mapdb by jankotek.
the class AbstractLongSetTestCase method collect.
@Override
@Test
public void collect() {
super.collect();
MutableLongSet set = this.newWith(0L, 1L, 31L, AbstractLongSetTestCase.generateCollisions1().getFirst(), AbstractLongSetTestCase.generateCollisions1().get(1));
Assert.assertEquals(UnifiedSet.newSetWith(-1L, 0L, 30L, AbstractLongSetTestCase.generateCollisions1().getFirst() - 1, AbstractLongSetTestCase.generateCollisions1().get(1) - 1), set.collect((long byteParameter) -> byteParameter - 1));
}
use of org.eclipse.collections.api.set.primitive.MutableLongSet in project mapdb by jankotek.
the class AbstractLongSetTestCase method asUnmodifiable.
@Override
@Test
public void asUnmodifiable() {
super.asUnmodifiable();
MutableLongSet set = this.newWith(0L, 1L, 31L, AbstractLongSetTestCase.generateCollisions1().getFirst(), AbstractLongSetTestCase.generateCollisions1().get(1));
Verify.assertInstanceOf(UnmodifiableLongSet.class, set.asUnmodifiable());
// Assert.assertEquals(new UnmodifiableLongSet(set), set.asUnmodifiable());
}
use of org.eclipse.collections.api.set.primitive.MutableLongSet in project mapdb by jankotek.
the class AbstractLongSetTestCase method retainAll.
@Override
@Test
public void retainAll() {
super.retainAll();
MutableLongSet set = this.newWith(0L, 1L, 31L, AbstractLongSetTestCase.generateCollisions1().getFirst(), AbstractLongSetTestCase.generateCollisions1().get(1));
Assert.assertFalse(set.retainAll(0L, 1L, 31L, AbstractLongSetTestCase.generateCollisions1().getFirst(), AbstractLongSetTestCase.generateCollisions1().get(1)));
Assert.assertEquals(LongHashSet.newSetWith(0L, 1L, 31L, AbstractLongSetTestCase.generateCollisions1().getFirst(), AbstractLongSetTestCase.generateCollisions1().get(1)), set);
Assert.assertTrue(set.retainAll(0L, 31L, AbstractLongSetTestCase.generateCollisions1().get(4), AbstractLongSetTestCase.generateCollisions1().get(1)));
Assert.assertEquals(LongHashSet.newSetWith(0L, 31L, AbstractLongSetTestCase.generateCollisions1().get(1)), set);
Assert.assertTrue(set.retainAll(1L, AbstractLongSetTestCase.generateCollisions1().getFirst()));
Assert.assertEquals(new LongHashSet(), set);
Assert.assertFalse(set.retainAll(1L));
Assert.assertEquals(new LongHashSet(), set);
}
use of org.eclipse.collections.api.set.primitive.MutableLongSet in project mapdb by jankotek.
the class AbstractLongSetTestCase method asSynchronized.
@Override
@Test
public void asSynchronized() {
super.asSynchronized();
MutableLongSet set = this.newWith(0L, 1L, 31L, AbstractLongSetTestCase.generateCollisions1().getFirst(), AbstractLongSetTestCase.generateCollisions1().get(1));
Verify.assertInstanceOf(SynchronizedLongSet.class, set.asSynchronized());
// Assert.assertEquals(new SynchronizedLongSet(set), set.asSynchronized());
}
Aggregations