/**
* Test if linear blocks returns false appropriately when changes are
* out of order.
*/
public void testOutOfOrder() {
BlockSequence listBlocks;
listBlocks = new BlockSequence();
assertTrue(listBlocks.insert(0, 2));
assertTrue(listBlocks.insert(2, 3));
assertFalse(listBlocks.insert(2, 3));
listBlocks = new BlockSequence();
assertTrue(listBlocks.delete(2, 4));
assertTrue(listBlocks.delete(2, 3));
assertFalse(listBlocks.delete(1, 2));
listBlocks = new BlockSequence();
assertTrue(listBlocks.update(2, 4));
assertTrue(listBlocks.update(4, 5));
assertFalse(listBlocks.update(4, 5));
listBlocks = new BlockSequence();
assertTrue(listBlocks.insert(2, 4));
assertFalse(listBlocks.update(3, 4));
listBlocks = new BlockSequence();
assertTrue(listBlocks.insert(2, 4));
assertFalse(listBlocks.delete(3, 4));
listBlocks = new BlockSequence();
assertTrue(listBlocks.update(2, 4));
assertFalse(listBlocks.delete(3, 4));
listBlocks = new BlockSequence();
assertTrue(listBlocks.update(2, 4));
assertFalse(listBlocks.insert(3, 4));
listBlocks = new BlockSequence();
assertTrue(listBlocks.delete(2, 4));
assertTrue(listBlocks.insert(2, 4));
listBlocks = new BlockSequence();
assertTrue(listBlocks.delete(2, 4));
assertFalse(listBlocks.insert(1, 2));
listBlocks = new BlockSequence();
assertTrue(listBlocks.delete(2, 4));
assertTrue(listBlocks.update(2, 4));
listBlocks = new BlockSequence();
assertTrue(listBlocks.delete(2, 4));
assertFalse(listBlocks.update(1, 2));
}