lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dna...@apache.org
Subject svn commit: r168454 - /lucene/java/trunk/src/test/org/apache/lucene/search/CheckHits.java
Date Thu, 05 May 2005 22:46:10 GMT
Author: dnaber
Date: Thu May  5 15:46:09 2005
New Revision: 168454

URL: http://svn.apache.org/viewcvs?rev=168454&view=rev
Log:
call static methods via class, not via object (avoids warning in Eclipse)

Modified:
    lucene/java/trunk/src/test/org/apache/lucene/search/CheckHits.java

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/CheckHits.java
URL: http://svn.apache.org/viewcvs/lucene/java/trunk/src/test/org/apache/lucene/search/CheckHits.java?rev=168454&r1=168453&r2=168454&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/CheckHits.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/CheckHits.java Thu May  5 15:46:09
2005
@@ -44,15 +44,15 @@
       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 */
   public static void checkDocIds(String mes, int[] results, Hits hits, TestCase testCase)
   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++) {
-      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 @@
     final float scoreTolerance = 1.0e-7f;
     for (int i = 0; i < results.length; i++) {
       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)
                       + "\n           and: " + hits2.score(i)
                       + "\nfor query:" + query.toString());



Mime
View raw message