LUCENE-4065: shitlist these broken ctors so they dont cause false fails

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1430939 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2013-01-09 16:33:13 +00:00
parent c2e2f8bb52
commit e23480ff25
1 changed files with 22 additions and 0 deletions

View File

@ -67,6 +67,8 @@ import org.apache.lucene.analysis.compound.hyphenation.HyphenationTree;
import org.apache.lucene.analysis.hunspell.HunspellDictionary;
import org.apache.lucene.analysis.hunspell.HunspellDictionaryTest;
import org.apache.lucene.analysis.miscellaneous.HyphenatedWordsFilter;
import org.apache.lucene.analysis.miscellaneous.KeepWordFilter;
import org.apache.lucene.analysis.miscellaneous.LengthFilter;
import org.apache.lucene.analysis.miscellaneous.LimitTokenCountFilter;
import org.apache.lucene.analysis.miscellaneous.TrimFilter;
import org.apache.lucene.analysis.miscellaneous.WordDelimiterFilter;
@ -197,6 +199,26 @@ public class TestRandomChains extends BaseTokenStreamTestCase {
return !(Boolean) args[0];
}
});
brokenOffsetsConstructors.put(
LengthFilter.class.getConstructor(boolean.class, TokenStream.class, int.class, int.class),
new Predicate<Object[]>() {
@Override
public boolean apply(Object[] args) {
assert args.length == 4;
// LUCENE-4065: only if you pass 'false' to enablePositionIncrements!
return !(Boolean) args[0];
}
});
brokenOffsetsConstructors.put(
KeepWordFilter.class.getConstructor(boolean.class, TokenStream.class, CharArraySet.class),
new Predicate<Object[]>() {
@Override
public boolean apply(Object[] args) {
assert args.length == 3;
// LUCENE-4065: only if you pass 'false' to enablePositionIncrements!
return !(Boolean) args[0];
}
});
for (Class<?> c : Arrays.<Class<?>>asList(
ReversePathHierarchyTokenizer.class,
PathHierarchyTokenizer.class,