}
}
// LUCENE-1255
public void testNegativePositions() throws Throwable {
SinkTokenizer tokens = new SinkTokenizer();
Token t = new Token();
t.setTermBuffer("a");
t.setPositionIncrement(0);
tokens.add(t);
t.setTermBuffer("b");
t.setPositionIncrement(1);
tokens.add(t);
t.setTermBuffer("c");
tokens.add(t);
MockRAMDirectory dir = new MockRAMDirectory();
IndexWriter w = new IndexWriter(dir, new WhitespaceAnalyzer(), true, IndexWriter.MaxFieldLength.UNLIMITED);
Document doc = new Document();
doc.add(new Field("field", tokens));