From e23480ff25a0946ebeea83d1b140b83af98848ac Mon Sep 17 00:00:00 2001 From: Robert Muir Date: Wed, 9 Jan 2013 16:33:13 +0000 Subject: [PATCH] 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 --- .../analysis/core/TestRandomChains.java | 22 +++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java index 50a620ef7a1..b100b8d6752 100644 --- a/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java +++ b/lucene/analysis/common/src/test/org/apache/lucene/analysis/core/TestRandomChains.java @@ -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() { + @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() { + @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.>asList( ReversePathHierarchyTokenizer.class, PathHierarchyTokenizer.class,