lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bmes...@apache.org
Subject cvs commit: jakarta-lucene/src/test/org/apache/lucene/index TestSegmentReader.java TestIndexReader.java TestFieldInfos.java
Date Sun, 19 Dec 2004 14:58:49 GMT
bmesser     2004/12/19 06:58:49

  Modified:    src/test/org/apache/lucene/index TestSegmentReader.java
                        TestIndexReader.java TestFieldInfos.java
  Log:
  make tests work again with bug fix in Reader getFieldNames
  
  Revision  Changes    Path
  1.6       +2 -2      jakarta-lucene/src/test/org/apache/lucene/index/TestSegmentReader.java
  
  Index: TestSegmentReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TestSegmentReader.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestSegmentReader.java	5 Oct 2004 17:30:47 -0000	1.5
  +++ TestSegmentReader.java	19 Dec 2004 14:58:49 -0000	1.6
  @@ -106,7 +106,7 @@
     public void testGetFieldNameVariations() {
       Collection result = reader.getFieldNames();
       assertTrue(result != null);
  -    assertTrue(result.size() == 7);
  +    assertTrue(result.size() == 6);
       for (Iterator iter = result.iterator(); iter.hasNext();) {
         String s = (String) iter.next();
         //System.out.println("Name: " + s);
  @@ -122,7 +122,7 @@
       
       result = reader.getFieldNames(false);
       assertTrue(result != null);
  -    assertTrue(result.size() == 2);
  +    assertTrue(result.size() == 1);
       //Get all indexed fields that are storing term vectors
       result = reader.getIndexedFieldNames(true);
       assertTrue(result != null);
  
  
  
  1.10      +2 -2      jakarta-lucene/src/test/org/apache/lucene/index/TestIndexReader.java
  
  Index: TestIndexReader.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TestIndexReader.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TestIndexReader.java	10 Oct 2004 15:58:32 -0000	1.9
  +++ TestIndexReader.java	19 Dec 2004 14:58:49 -0000	1.10
  @@ -83,7 +83,7 @@
           // verify fields again
           reader = IndexReader.open(d);
           fieldNames = reader.getFieldNames();
  -        assertEquals(9, fieldNames.size());    // the following fields + an empty one (bug?!)
  +        assertEquals(8, fieldNames.size());    // the following fields
           assertTrue(fieldNames.contains("keyword"));
           assertTrue(fieldNames.contains("text"));
           assertTrue(fieldNames.contains("unindexed"));
  @@ -105,7 +105,7 @@
   
           // verify that only unindexed fields were returned
           Collection unindexedFieldNames = reader.getFieldNames(false);
  -        assertEquals(3, unindexedFieldNames.size());    // the following fields + an empty
one
  +        assertEquals(2, unindexedFieldNames.size());    // the following fields
           assertTrue(unindexedFieldNames.contains("unindexed"));
           assertTrue(unindexedFieldNames.contains("unindexed2"));
       }
  
  
  
  1.5       +1 -1      jakarta-lucene/src/test/org/apache/lucene/index/TestFieldInfos.java
  
  Index: TestFieldInfos.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TestFieldInfos.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- TestFieldInfos.java	10 Oct 2004 15:58:32 -0000	1.4
  +++ TestFieldInfos.java	19 Dec 2004 14:58:49 -0000	1.5
  @@ -31,7 +31,7 @@
       FieldInfos fieldInfos = new FieldInfos();
       fieldInfos.add(testDoc);
       //Since the complement is stored as well in the fields map
  -    assertTrue(fieldInfos.size() == 7); //this is 7 b/c we are using the no-arg constructor
  +    assertTrue(fieldInfos.size() == 6); //this is 6 b/c we are using the no-arg constructor
       RAMDirectory dir = new RAMDirectory();
       String name = "testFile";
       IndexOutput output = dir.createOutput(name);
  
  
  

---------------------------------------------------------------------
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