lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject tests cases, Ruby, commitership
Date Fri, 18 Jul 2003 23:09:54 GMT
I am embarking on an ambitious project, the implementation of a Ruby 
API for the Lucene index file format (name suggestions welcome!).  In 
digging under the covers deeper than ever before, I'm learning lots of 
what makes Lucene tick.  In order to really learn it, I'm writing some 
unit tests to assert my understanding.  Here's an example:

public class InputStreamTest extends TestCase {
     public void testReadVInt() throws IOException {
         InputStream is = new MockInputStream(new byte[] { (byte) 0x80, 
                                                           (byte) 0xFF, 
                                                           (byte) 0x80, 
(byte) 0x80, 0x01,
                                                           (byte) 0x81, 
(byte) 0x80, 0x01});

The MockInputStream is a Lucene InputStream subclass that simply feeds 
out the bytes, similar to the RAMDirectory$RAMInputStream.  The above 
asserts come directly from the documentation on the file format 
description of VInt  I don't believe there are existing unit tests that 
are asserting features at this low of a level, are there?

I would like to make these unit tests part of Lucene's codebase.

Is it bad form to propose myself as a committer to CVS on Lucene?   I'm 
already a jakarta-lucene-sandbox and Ant committer (and also a 
committer on the SourceForge XDoclet project), as well as a newly 
elected ASF Member - just so you know I'll be responsible with the 
codebase :)  It would be more fun to commit my test cases (and only 
test cases at this point, no functionality changes at all - Lucene 
works perfectly well for me as is) myself than to submit them as 
patches.  Also, you certainly could expect documentation additions over 
time as well.


p.s. If anyone knows of an existing or in-the-works Ruby 
implementation, please let me know so I don't reinvent the wheel.  Or 
if you'd like to assist, it'll certainly be open-source.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message