lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ehatc...@apache.org
Subject cvs commit: jakarta-lucene/src/test/org/apache/lucene/index/store FSDirectoryTestCase.java
Date Mon, 14 Jun 2004 00:16:06 GMT
ehatcher    2004/06/13 17:16:06

  Modified:    src/test/org/apache/lucene/index TestFilterIndexReader.java
                        TestSegmentTermEnum.java
  Added:       src/test/org/apache/lucene/index/store
                        FSDirectoryTestCase.java
  Log:
  #29548 rename enum
  
  Revision  Changes    Path
  1.6       +2 -2      jakarta-lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java
  
  Index: TestFilterIndexReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TestFilterIndexReader.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestFilterIndexReader.java	11 May 2004 19:28:51 -0000	1.5
  +++ TestFilterIndexReader.java	14 Jun 2004 00:16:05 -0000	1.6
  @@ -43,9 +43,9 @@
   
        /** Filter that only permits terms containing 'e'.*/
       private static class TestTermEnum extends FilterTermEnum {
  -      public TestTermEnum(TermEnum enum)
  +      public TestTermEnum(TermEnum termEnum)
           throws IOException {
  -        super(enum);
  +        super(termEnum);
         }
   
         /** Scan for terms containing the letter 'e'.*/
  
  
  
  1.2       +16 -16    jakarta-lucene/src/test/org/apache/lucene/index/TestSegmentTermEnum.java
  
  Index: TestSegmentTermEnum.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TestSegmentTermEnum.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- TestSegmentTermEnum.java	10 Sep 2003 14:23:58 -0000	1.1
  +++ TestSegmentTermEnum.java	14 Jun 2004 00:16:05 -0000	1.2
  @@ -63,36 +63,36 @@
         throws IOException
     {
         IndexReader reader = IndexReader.open(dir);
  -      TermEnum enum = null;
  +      TermEnum termEnum = null;
   
       // create enumeration of all terms
  -    enum = reader.terms();
  +    termEnum = reader.terms();
       // go to the first term (aaa)
  -    enum.next();
  +    termEnum.next();
       // assert that term is 'aaa'
  -    assertEquals("aaa", enum.term().text());
  -    assertEquals(200, enum.docFreq());
  +    assertEquals("aaa", termEnum.term().text());
  +    assertEquals(200, termEnum.docFreq());
       // go to the second term (bbb)
  -    enum.next();
  +    termEnum.next();
       // assert that term is 'bbb'
  -    assertEquals("bbb", enum.term().text());
  -    assertEquals(100, enum.docFreq());
  +    assertEquals("bbb", termEnum.term().text());
  +    assertEquals(100, termEnum.docFreq());
   
  -    enum.close();
  +    termEnum.close();
   
   
       // create enumeration of terms after term 'aaa', including 'aaa'
  -    enum = reader.terms(new Term("content", "aaa"));
  +    termEnum = reader.terms(new Term("content", "aaa"));
       // assert that term is 'aaa'
  -    assertEquals("aaa", enum.term().text());
  -    assertEquals(200, enum.docFreq());
  +    assertEquals("aaa", termEnum.term().text());
  +    assertEquals(200, termEnum.docFreq());
       // go to term 'bbb'
  -    enum.next();
  +    termEnum.next();
       // assert that term is 'bbb'
  -    assertEquals("bbb", enum.term().text());
  -    assertEquals(100, enum.docFreq());
  +    assertEquals("bbb", termEnum.term().text());
  +    assertEquals(100, termEnum.docFreq());
   
  -    enum.close();
  +    termEnum.close();
     }
   
     private void addDoc(IndexWriter writer, String value)
  
  
  
  1.1                  jakarta-lucene/src/test/org/apache/lucene/index/store/FSDirectoryTestCase.java
  
  Index: FSDirectoryTestCase.java
  ===================================================================
  package org.apache.lucene.index.store;
  
  import junit.framework.TestCase;
  import org.apache.lucene.store.FSDirectory;
  import java.io.IOException;
  
  abstract public class FSDirectoryTestCase extends TestCase {
    private FSDirectory directory;
  
    protected final FSDirectory getDirectory() throws IOException {
      return getDirectory(false);
    }
  
    protected final FSDirectory getDirectory(boolean create) throws IOException {
      if (directory == null) {
        directory = FSDirectory.getDirectory(System.getProperty("test.index.dir"), create);
      }
  
      return directory;
    }
  }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-dev-help@jakarta.apache.org


Mime
View raw message