@Test public void grow() { for (int i = 0; i < 5 * IntegerStack.CHUNK_SIZE; i++) { stk.push(i); } for (int i = 5 * IntegerStack.CHUNK_SIZE - 1; i >= 0; i--) { assertEquals(i, stk.pop().intValue()); } }
@Test public void pop() { for (int i = 0; i < 100; i++) { stk.push(i); } for (int i = 99; i >= 0; i--) { assertEquals(i, stk.pop().intValue()); } }