You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by sc...@apache.org on 2015/03/09 22:47:55 UTC

svn commit: r1665369 - /uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IteratorTest.java

Author: schor
Date: Mon Mar  9 21:47:54 2015
New Revision: 1665369

URL: http://svn.apache.org/r1665369
Log:
no Jira, add small comments

Modified:
    uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IteratorTest.java

Modified: uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IteratorTest.java
URL: http://svn.apache.org/viewvc/uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IteratorTest.java?rev=1665369&r1=1665368&r2=1665369&view=diff
==============================================================================
--- uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IteratorTest.java (original)
+++ uima/uimaj/trunk/uimaj-core/src/test/java/org/apache/uima/cas/test/IteratorTest.java Mon Mar  9 21:47:54 2015
@@ -257,13 +257,14 @@ public class IteratorTest extends TestCa
   public void testMoveTo() {
     // Add some arbitrary annotations
     for (int i = 0; i < 10; i++) {
-      createFSs(i);
+      createFSs(i);  // add annotation, sentence, and 3 tokens, all with same begin / end
     }
     final int start = 5;
     final int end = 7;
     FSIndexRepository repo = this.cas.getIndexRepository();
     for (int i = 0; i < 10; i++) {
-      AnnotationFS annotation = this.cas.createAnnotation(this.annotationType, start, end);
+      // add 10 annotations with start 5, end 7
+      AnnotationFS annotation = this.cas.createAnnotation(this.annotationType, start, end);  
       repo.addFS(annotation);
     }
     AnnotationFS match = this.cas.createAnnotation(this.annotationType, start, end);
@@ -271,7 +272,7 @@ public class IteratorTest extends TestCa
     FSIndex<AnnotationFS> ssIndex = index.withSnapshotIterators();
     FSIterator<AnnotationFS> it = index.iterator();
     FSIterator<AnnotationFS> ssit = ssIndex.iterator();
-    it.moveTo(match);
+    it.moveTo(match);  // should move to left-most of the 10 with start=5 end=7
     ssit.moveTo(match);
     assertTrue(index.compare(match, it.get()) == 0);
     assertTrue(index.compare(match, ssit.get()) == 0);
@@ -460,7 +461,7 @@ public class IteratorTest extends TestCa
     fastFailTst(bagIndex, true);
     fastFailTst(ssBagIndex, false);
    
-    fastFailTst(sortedIndex, true);
+    fastFailTst(sortedIndex, true);  
     fastFailTst(ssSortedIndex, false);