add short description for the new test and remove misleading comment.

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@150657 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Bernhard Messer 2004-11-22 09:37:24 +00:00
parent f2b8cfbde7
commit debe012863

View File

@ -204,6 +204,12 @@ public class TestTermVectorsWriter extends TestCase {
}
}
/**
* Test that no NullPointerException will be raised,
* when adding one document with a single, empty field
* and term vectors enabled.
*
*/
public void testBadSegment() {
try {
dir = new RAMDirectory();
@ -211,10 +217,10 @@ public class TestTermVectorsWriter extends TestCase {
Document document = new Document();
document.add(new Field("tvtest", "", Field.Store.NO, Field.Index.TOKENIZED,
Field.TermVector.YES)); // throws exception, works with Field.TermVector.NO
Field.TermVector.YES));
ir.addDocument(document);
ir.close();
dir.close();
} catch (Exception e) {
e.printStackTrace();
assertTrue(false);