lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r782408 - in /lucene/java/branches/lucene_2_4_back_compat_tests/src: java/org/apache/lucene/util/OpenBitSetIterator.java test/org/apache/lucene/util/TestOpenBitSet.java test/org/apache/lucene/util/TestSortedVIntList.java
Date Sun, 07 Jun 2009 16:53:27 GMT
Author: mikemccand
Date: Sun Jun  7 16:53:26 2009
New Revision: 782408

URL: http://svn.apache.org/viewvc?rev=782408&view=rev
Log:
LUCENE-1614: switch next -> nextDoc, skipTo -> advance in DISI

Modified:
    lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/util/OpenBitSetIterator.java
    lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/util/TestOpenBitSet.java
    lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/util/TestSortedVIntList.java

Modified: lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/util/OpenBitSetIterator.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/util/OpenBitSetIterator.java?rev=782408&r1=782407&r2=782408&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/util/OpenBitSetIterator.java
(original)
+++ lucene/java/branches/lucene_2_4_back_compat_tests/src/java/org/apache/lucene/util/OpenBitSetIterator.java
Sun Jun  7 16:53:26 2009
@@ -197,7 +197,7 @@
   
   /** Behaves like {@link #skipTo(int)} and returns the docId the iterator
    *  skipped to; returns -1 if no valid document could be skipped to. */
-  public int next(int fromIndex) {
+  public int advance(int fromIndex) {
     indexArray=0;
     i = fromIndex >> 6;
     if (i>=words) {

Modified: lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/util/TestOpenBitSet.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/util/TestOpenBitSet.java?rev=782408&r1=782407&r2=782408&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/util/TestOpenBitSet.java
(original)
+++ lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/util/TestOpenBitSet.java
Sun Jun  7 16:53:26 2009
@@ -62,7 +62,7 @@
       else
         iterator.skipTo(bb+1);
       bb = iterator.doc();
-      assertEquals(aa,bb);
+      assertEquals(aa == -1 ? Integer.MAX_VALUE : aa,bb);
     } while (aa>=0);
   }
 
@@ -74,8 +74,8 @@
       if (rand.nextBoolean())
         bb = iterator.nextDoc();
       else
-        bb = iterator.next(bb+1);
-      assertEquals(aa,bb);
+        bb = iterator.advance(bb + 1);
+      assertEquals(aa == -1 ? Integer.MAX_VALUE : aa,bb);
     } while (aa>=0);
   }
 

Modified: lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/util/TestSortedVIntList.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/util/TestSortedVIntList.java?rev=782408&r1=782407&r2=782408&view=diff
==============================================================================
--- lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/util/TestSortedVIntList.java
(original)
+++ lucene/java/branches/lucene_2_4_back_compat_tests/src/test/org/apache/lucene/util/TestSortedVIntList.java
Sun Jun  7 16:53:26 2009
@@ -143,9 +143,6 @@
   public void test02() {
     tstInts(new int[] {0});
   }
-  public void test03() {
-    tstInts(new int[] {0,Integer.MAX_VALUE});
-  }
   public void test04a() {
     tstInts(new int[] {0, VB2 - 1});
   }



Mime
View raw message