public void testOffBalance() throws OperationException { AnnotationTree<Object> tree = new AnnotationTree<Object>(new Object(), new Object(), null); final int size = 15; insert(tree, 0, size); for (int i = 0; i < size - 1; i++) { setAnnotation(tree, i, i + 1, "a", "" + i); tree.checkSomeInvariants(); } }
public void testOffBalance() throws OperationException { AnnotationTree<Object> tree = new AnnotationTree<Object>(new Object(), new Object(), null); final int size = 15; insert(tree, 0, size); for (int i = 0; i < size - 1; i++) { setAnnotation(tree, i, i + 1, "a", "" + i); tree.checkSomeInvariants(); } }
public void testRemoveAll() throws OperationException { AnnotationTree<Object> tree = new AnnotationTree<Object>(new Object(), new Object(), null); insert(tree, 0, 1); setAnnotation(tree, 0, 1, "a", "0"); setAnnotation(tree, 0, 1, "a", null); delete(tree, 0, 1); }
public void testRemoveAll() throws OperationException { AnnotationTree<Object> tree = new AnnotationTree<Object>(new Object(), new Object(), null); insert(tree, 0, 1); setAnnotation(tree, 0, 1, "a", "0"); setAnnotation(tree, 0, 1, "a", null); delete(tree, 0, 1); }
public void testEraseMergeDuringSetAnnotation() throws OperationException { { AnnotationTree<Object> tree = new AnnotationTree<Object>(new Object(), new Object(), null); insert(tree, 0, 3); setAnnotation(tree, 0, 1, "a", "1"); setAnnotation(tree, 1, 2, "a", "2"); setAnnotation(tree, 2, 3, "a", "3"); setAnnotation(tree, 0, 2, "a", "5"); } { AnnotationTree<Object> tree = new AnnotationTree<Object>(new Object(), new Object(), null); insert(tree, 0, 3); setAnnotation(tree, 0, 1, "a", "1"); setAnnotation(tree, 1, 2, "a", "2"); setAnnotation(tree, 2, 3, "a", "3"); setAnnotation(tree, 1, 3, "a", "5"); } }
public void testEraseMergeDuringSetAnnotation() throws OperationException { { AnnotationTree<Object> tree = new AnnotationTree<Object>(new Object(), new Object(), null); insert(tree, 0, 3); setAnnotation(tree, 0, 1, "a", "1"); setAnnotation(tree, 1, 2, "a", "2"); setAnnotation(tree, 2, 3, "a", "3"); setAnnotation(tree, 0, 2, "a", "5"); } { AnnotationTree<Object> tree = new AnnotationTree<Object>(new Object(), new Object(), null); insert(tree, 0, 3); setAnnotation(tree, 0, 1, "a", "1"); setAnnotation(tree, 1, 2, "a", "2"); setAnnotation(tree, 2, 3, "a", "3"); setAnnotation(tree, 1, 3, "a", "5"); } }