From 7e35195b59fa3ef10fde80a8ca8ae7fa7aa577e6 Mon Sep 17 00:00:00 2001 From: Michael McCandless Date: Thu, 12 Jul 2012 21:59:41 +0000 Subject: [PATCH] LUCENE-4211: fix another test bug git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1360979 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/index/TestPostingsOffsets.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java b/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java index 987594c8862..71c8f8c8d9f 100644 --- a/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java +++ b/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java @@ -330,17 +330,17 @@ public class TestPostingsOffsets extends LuceneTestCase { docsAndPositionsAndOffsets = termsEnum.docsAndPositions(null, docsAndPositions, true); assertNotNull(docsAndPositionsAndOffsets); //System.out.println(" doc/freq/pos/offs"); - while((doc = docsAndPositions.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) { + while((doc = docsAndPositionsAndOffsets.nextDoc()) != DocIdSetIterator.NO_MORE_DOCS) { final List expected = actualTokens.get(term).get(docIDToID[doc]); //System.out.println(" doc=" + docIDToID[doc] + " " + expected.size() + " freq"); assertNotNull(expected); - assertEquals(expected.size(), docsAndPositions.freq()); + assertEquals(expected.size(), docsAndPositionsAndOffsets.freq()); for(Token token : expected) { int pos = Integer.parseInt(token.type()); //System.out.println(" pos=" + pos); - assertEquals(pos, docsAndPositions.nextPosition()); - assertEquals(token.startOffset(), docsAndPositions.startOffset()); - assertEquals(token.endOffset(), docsAndPositions.endOffset()); + assertEquals(pos, docsAndPositionsAndOffsets.nextPosition()); + assertEquals(token.startOffset(), docsAndPositionsAndOffsets.startOffset()); + assertEquals(token.endOffset(), docsAndPositionsAndOffsets.endOffset()); } } }