protected void checkAdvance(AnnotationCursor cursor, int location, String ... keys) { assertTrue(cursor.hasNext()); assertEquals( CollectionUtils.newJavaSet(strs(keys)), CollectionUtils.newJavaSet(cursor.nextLocation())); assertEquals(location, cursor.currentLocation()); }
protected void checkAdvance(AnnotationCursor cursor, int location, String ... keys) { assertTrue(cursor.hasNext()); assertEquals( CollectionUtils.newJavaSet(strs(keys)), CollectionUtils.newJavaSet(cursor.nextLocation())); assertEquals(location, cursor.currentLocation()); }
public void testInitialStartLocation() { RawAnnotationSet<Object> m = getNewSet(); m.begin(); m.insert(100); m.finish(); // -1 if no hasNext() AnnotationCursor c = m.annotationCursor(40, 80, strs("a")); assertEquals(-1, c.currentLocation()); m.begin(); m.skip(50); m.startAnnotation("a", "1"); m.skip(10); m.endAnnotation("a"); m.finish(); // start value, if hasNext(); c = m.annotationCursor(40, 80, strs("a")); assertEquals(40, c.currentLocation()); }
public void testInitialStartLocation() { RawAnnotationSet<Object> m = getNewSet(); m.begin(); m.insert(100); m.finish(); // -1 if no hasNext() AnnotationCursor c = m.annotationCursor(40, 80, strs("a")); assertEquals(-1, c.currentLocation()); m.begin(); m.skip(50); m.startAnnotation("a", "1"); m.skip(10); m.endAnnotation("a"); m.finish(); // start value, if hasNext(); c = m.annotationCursor(40, 80, strs("a")); assertEquals(40, c.currentLocation()); }