lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gol...@apache.org
Subject cvs commit: jakarta-lucene/src/test/org/apache/lucene/index TestCompoundFile.java
Date Thu, 20 Nov 2003 19:03:22 GMT
goller      2003/11/20 11:03:22

  Modified:    src/test/org/apache/lucene/index TestCompoundFile.java
  Log:
  seek checks removed; such ckecks are not implemented
  by the other subclasses of InputStream either. Unit test
  adapted accordingly.
  
  Revision  Changes    Path
  1.4       +4 -20     jakarta-lucene/src/test/org/apache/lucene/index/TestCompoundFile.java
  
  Index: TestCompoundFile.java
  ===================================================================
  RCS file: /home/cvs/jakarta-lucene/src/test/org/apache/lucene/index/TestCompoundFile.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestCompoundFile.java	23 Oct 2003 02:02:06 -0000	1.3
  +++ TestCompoundFile.java	20 Nov 2003 19:03:22 -0000	1.4
  @@ -64,6 +64,7 @@
   import org.apache.lucene.store.Directory;
   import org.apache.lucene.store.InputStream;
   import org.apache.lucene.store.FSDirectory;
  +import org.apache.lucene.store.RAMDirectory;
   import org.apache.lucene.store._TestHelper;
   
   
  @@ -163,25 +164,8 @@
                                      long seekTo)
       throws IOException
       {
  -        if (seekTo < 0) {
  -            try {
  -                actual.seek(seekTo);
  -                fail(msg + ", " + seekTo + ", negative seek");
  -            } catch (IOException e) {
  -                /* success */
  -                //System.out.println("SUCCESS: Negative seek: " + e);
  -            }
  -
  -        } else if (seekTo > 0 && seekTo >= expected.length()) {
  -            try {
  -                actual.seek(seekTo);
  -                fail(msg + ", " + seekTo + ", seek past EOF");
  -            } catch (IOException e) {
  -                /* success */
  -                //System.out.println("SUCCESS: Seek past EOF: " + e);
  -            }
  -
  -        } else {
  +        if(seekTo >= 0 && seekTo < expected.length())
  +        {
               expected.seek(seekTo);
               actual.seek(seekTo);
               assertSameStreams(msg + ", seek(mid)", expected, actual);
  
  
  

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