mirror of https://github.com/apache/lucene.git
fix bad tests: you cannot test a posInc that does not exist (e.g. some stopfilter etc must set it first)
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/branches/solr@923008 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
21f422de94
commit
09ccd41e2e
|
@ -51,8 +51,7 @@ public class TestPatternReplaceCharFilter extends BaseTokenTestCase {
|
|||
assertTokenStreamContents(ts,
|
||||
new String[] { "this", "is", "test." },
|
||||
new int[] { 0, 5, 8 },
|
||||
new int[] { 4, 7, 13 },
|
||||
new int[] { 1, 1, 1 });
|
||||
new int[] { 4, 7, 13 });
|
||||
}
|
||||
|
||||
// 012345678
|
||||
|
@ -85,8 +84,7 @@ public class TestPatternReplaceCharFilter extends BaseTokenTestCase {
|
|||
assertTokenStreamContents(ts,
|
||||
new String[] { "aa#bb#cc" },
|
||||
new int[] { 0 },
|
||||
new int[] { 8 },
|
||||
new int[] { 1 });
|
||||
new int[] { 8 });
|
||||
}
|
||||
|
||||
// 11111
|
||||
|
@ -101,8 +99,7 @@ public class TestPatternReplaceCharFilter extends BaseTokenTestCase {
|
|||
assertTokenStreamContents(ts,
|
||||
new String[] { "aa##bb###cc", "dd" },
|
||||
new int[] { 0, 9 },
|
||||
new int[] { 8, 11 },
|
||||
new int[] { 1, 1 });
|
||||
new int[] { 8, 11 });
|
||||
}
|
||||
|
||||
// 01234567
|
||||
|
@ -116,8 +113,7 @@ public class TestPatternReplaceCharFilter extends BaseTokenTestCase {
|
|||
assertTokenStreamContents(ts,
|
||||
new String[] { "aa", "aa" },
|
||||
new int[] { 1, 4 },
|
||||
new int[] { 2, 5 },
|
||||
new int[] { 1, 1 });
|
||||
new int[] { 2, 5 });
|
||||
}
|
||||
|
||||
// 11111
|
||||
|
@ -132,8 +128,7 @@ public class TestPatternReplaceCharFilter extends BaseTokenTestCase {
|
|||
assertTokenStreamContents(ts,
|
||||
new String[] { "aa#bb", "dd" },
|
||||
new int[] { 0, 12 },
|
||||
new int[] { 11, 14 },
|
||||
new int[] { 1, 1 });
|
||||
new int[] { 11, 14 });
|
||||
}
|
||||
|
||||
// 111111111122222222223333
|
||||
|
@ -148,8 +143,7 @@ public class TestPatternReplaceCharFilter extends BaseTokenTestCase {
|
|||
assertTokenStreamContents(ts,
|
||||
new String[] { "aa", "bb", "cc", "---", "aa", "bb", "aa", "bb", "cc" },
|
||||
new int[] { 2, 6, 9, 11, 15, 18, 21, 25, 29 },
|
||||
new int[] { 4, 8, 10, 14, 17, 20, 23, 27, 33 },
|
||||
new int[] { 1, 1, 1, 1, 1, 1, 1, 1, 1 });
|
||||
new int[] { 4, 8, 10, 14, 17, 20, 23, 27, 33 });
|
||||
}
|
||||
|
||||
// 11111111112222222222333333333
|
||||
|
@ -164,8 +158,7 @@ public class TestPatternReplaceCharFilter extends BaseTokenTestCase {
|
|||
assertTokenStreamContents(ts,
|
||||
new String[] { "aa##bb", "cc", "---", "aa##bb", "aa.", "bb", "aa##bb", "cc" },
|
||||
new int[] { 2, 8, 11, 15, 21, 25, 28, 36 },
|
||||
new int[] { 7, 10, 14, 20, 24, 27, 35, 38 },
|
||||
new int[] { 1, 1, 1, 1, 1, 1, 1, 1 });
|
||||
new int[] { 7, 10, 14, 20, 24, 27, 35, 38 });
|
||||
}
|
||||
|
||||
// 11111111112222222222333333333
|
||||
|
@ -182,8 +175,7 @@ public class TestPatternReplaceCharFilter extends BaseTokenTestCase {
|
|||
assertTokenStreamContents(ts,
|
||||
new String[] { "aa", "b", "-", "c", ".", "---", "b", "aa", ".", "c", "c", "b" },
|
||||
new int[] { 1, 3, 6, 8, 12, 14, 18, 21, 23, 25, 29, 33 },
|
||||
new int[] { 2, 5, 7, 11, 13, 17, 20, 22, 24, 28, 32, 35 },
|
||||
new int[] { 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 });
|
||||
new int[] { 2, 5, 7, 11, 13, 17, 20, 22, 24, 28, 32, 35 });
|
||||
}
|
||||
|
||||
private Pattern pattern( String p ){
|
||||
|
|
|
@ -97,8 +97,7 @@ public class TestPatternTokenizerFactory extends BaseTokenTestCase
|
|||
assertTokenStreamContents(stream,
|
||||
new String[] { "Günther", "Günther", "is", "here" },
|
||||
new int[] { 0, 13, 26, 29 },
|
||||
new int[] { 12, 25, 28, 33 },
|
||||
new int[] { 1, 1, 1, 1 });
|
||||
new int[] { 12, 25, 28, 33 });
|
||||
|
||||
charStream = new MappingCharFilter( normMap, CharReader.get( new StringReader( INPUT ) ) );
|
||||
args.put( PatternTokenizerFactory.PATTERN, "Günther" );
|
||||
|
@ -109,8 +108,7 @@ public class TestPatternTokenizerFactory extends BaseTokenTestCase
|
|||
assertTokenStreamContents(stream,
|
||||
new String[] { "Günther", "Günther" },
|
||||
new int[] { 0, 13 },
|
||||
new int[] { 12, 25 },
|
||||
new int[] { 1, 1 });
|
||||
new int[] { 12, 25 });
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -97,8 +97,7 @@ public class TestReversedWildcardFilterFactory extends AbstractSolrTestCase {
|
|||
assertTokenStreamContents(input,
|
||||
new String[] { "one", "two", "three", "si\uD834\uDD1Ex" },
|
||||
new int[] { 0, 4, 8, 14 },
|
||||
new int[] { 3, 7, 13, 19 },
|
||||
new int[] { 1, 1, 1, 1 }
|
||||
new int[] { 3, 7, 13, 19 }
|
||||
);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue