mirror of https://github.com/apache/lucene.git
call static methods via class, not via object (avoids warning in Eclipse)
git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@168454 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ffbdf0b882
commit
170bdc33a3
|
@ -44,15 +44,15 @@ public class CheckHits {
|
||||||
actual.add(new Integer(hits.id(i)));
|
actual.add(new Integer(hits.id(i)));
|
||||||
}
|
}
|
||||||
|
|
||||||
testCase.assertEquals(query.toString(defaultFieldName), correct, actual);
|
TestCase.assertEquals(query.toString(defaultFieldName), correct, actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Tests that a Hits has an expected order of documents */
|
/** Tests that a Hits has an expected order of documents */
|
||||||
public static void checkDocIds(String mes, int[] results, Hits hits, TestCase testCase)
|
public static void checkDocIds(String mes, int[] results, Hits hits, TestCase testCase)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
testCase.assertEquals(mes + " nr of hits", results.length, hits.length());
|
TestCase.assertEquals(mes + " nr of hits", results.length, hits.length());
|
||||||
for (int i = 0; i < results.length; i++) {
|
for (int i = 0; i < results.length; i++) {
|
||||||
testCase.assertEquals(mes + " doc nrs for hit " + i, results[i], hits.id(i));
|
TestCase.assertEquals(mes + " doc nrs for hit " + i, results[i], hits.id(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ public class CheckHits {
|
||||||
final float scoreTolerance = 1.0e-7f;
|
final float scoreTolerance = 1.0e-7f;
|
||||||
for (int i = 0; i < results.length; i++) {
|
for (int i = 0; i < results.length; i++) {
|
||||||
if (Math.abs(hits1.score(i) - hits2.score(i)) > scoreTolerance) {
|
if (Math.abs(hits1.score(i) - hits2.score(i)) > scoreTolerance) {
|
||||||
testCase.fail("Hit " + i + ", doc nrs " + hits1.id(i) + " and " + hits2.id(i)
|
TestCase.fail("Hit " + i + ", doc nrs " + hits1.id(i) + " and " + hits2.id(i)
|
||||||
+ "\nunequal scores: " + hits1.score(i)
|
+ "\nunequal scores: " + hits1.score(i)
|
||||||
+ "\n and: " + hits2.score(i)
|
+ "\n and: " + hits2.score(i)
|
||||||
+ "\nfor query:" + query.toString());
|
+ "\nfor query:" + query.toString());
|
||||||
|
|
Loading…
Reference in New Issue