use of org.lanternpowered.server.util.collect.array.concurrent.AtomicShortArray in project LanternServer by LanternPowered.
the class AtomicShortArrayTest method testGetAndSet.
@Test
public void testGetAndSet() {
AtomicShortArray array = new AtomicShortArray(SIZE);
for (int i = 0; i < SIZE; i++) {
array.set(i, A);
assertEquals(A, array.getAndSet(i, B));
assertEquals(B, array.getAndSet(i, E));
assertEquals(E, array.getAndSet(i, A));
}
}
Aggregations