lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1066617 - /lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/codecs/pfordelta/TestPForDelta.java
Date Wed, 02 Feb 2011 20:32:44 GMT
Author: rmuir
Date: Wed Feb  2 20:32:44 2011
New Revision: 1066617

URL: http://svn.apache.org/viewvc?rev=1066617&view=rev
Log:
fix sneaky off-by-one: the test data could lie on a block boundary

Modified:
    lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/codecs/pfordelta/TestPForDelta.java

Modified: lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/codecs/pfordelta/TestPForDelta.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/codecs/pfordelta/TestPForDelta.java?rev=1066617&r1=1066616&r2=1066617&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/codecs/pfordelta/TestPForDelta.java
(original)
+++ lucene/dev/branches/bulkpostings/lucene/src/test/org/apache/lucene/index/codecs/pfordelta/TestPForDelta.java
Wed Feb  2 20:32:44 2011
@@ -61,12 +61,12 @@ public class TestPForDelta extends Lucen
       assertTrue(pointerMax > 0);
 
       for(int i=0;i<testDataSize;i++) {
-        assertEquals(testData[i], buffer[pointer++]);
         if (pointer == pointerMax) {
           pointerMax = r.fill();
           assertTrue(pointerMax > 0);
           pointer = 0;
         }
+        assertEquals(testData[i], buffer[pointer++]);
       }
       in.close();
       dir.close();



Mime
View raw message