public class RealValueFileEventStreamTest extends TestCase {
public void testLastLineBug() throws IOException {
OnePassRealValueDataIndexer indexer;
RealValueFileEventStream rvfes;
rvfes = new RealValueFileEventStream(
"src/test/resources/data/opennlp/maxent/io/rvfes-bug-data-ok.txt");
try {
indexer = new OnePassRealValueDataIndexer(rvfes, 1);
} finally {
rvfes.close();
}
assertEquals(1, indexer.getOutcomeLabels().length);
rvfes = new RealValueFileEventStream(
"src/test/resources/data/opennlp/maxent/io/rvfes-bug-data-broken.txt");
try {
indexer = new OnePassRealValueDataIndexer(rvfes, 1);
} finally {
rvfes.close();
}
assertEquals(1, indexer.getOutcomeLabels().length);
}