mirror of https://github.com/apache/lucene.git
LUCENE-9032: BaseTokenStreamTestCase minor...
* make checkResetException() public * one assertAnalyzesTo variant should be calling checkAnalysisConsistency (only used by OpenNLP tests now)
This commit is contained in:
parent
0303063e12
commit
2aa51fe77c
|
@ -392,6 +392,7 @@ public abstract class BaseTokenStreamTestCase extends LuceneTestCase {
|
|||
public static void assertAnalyzesTo(Analyzer a, String input, String[] output, int startOffsets[], int endOffsets[], String types[], int posIncrements[], int posLengths[], boolean graphOffsetsAreCorrect, byte[][] payloads) throws IOException {
|
||||
assertTokenStreamContents(a.tokenStream("dummy", input), output, startOffsets, endOffsets, types, posIncrements, posLengths, input.length(), null, null, graphOffsetsAreCorrect, payloads);
|
||||
checkResetException(a, input);
|
||||
checkAnalysisConsistency(random(), a, true, input, graphOffsetsAreCorrect);
|
||||
}
|
||||
|
||||
public static void assertAnalyzesTo(Analyzer a, String input, String[] output) throws IOException {
|
||||
|
@ -422,7 +423,7 @@ public abstract class BaseTokenStreamTestCase extends LuceneTestCase {
|
|||
assertAnalyzesTo(a, input, output, startOffsets, endOffsets, null, posIncrements, null);
|
||||
}
|
||||
|
||||
static void checkResetException(Analyzer a, String input) throws IOException {
|
||||
public static void checkResetException(Analyzer a, String input) throws IOException {
|
||||
TokenStream ts = a.tokenStream("bogus", input);
|
||||
try {
|
||||
if (ts.incrementToken()) {
|
||||
|
|
Loading…
Reference in New Issue