lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1617626 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/search/TestBooleanUnevenly.java
Date Tue, 12 Aug 2014 23:37:16 GMT
Author: mikemccand
Date: Tue Aug 12 23:37:15 2014
New Revision: 1617626

URL: http://svn.apache.org/r1617626
Log:
test: reset count1=0 in beforeClass

Modified:
    lucene/dev/branches/branch_4x/   (props changed)
    lucene/dev/branches/branch_4x/lucene/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/   (props changed)
    lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanUnevenly.java

Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanUnevenly.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanUnevenly.java?rev=1617626&r1=1617625&r2=1617626&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanUnevenly.java
(original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/search/TestBooleanUnevenly.java
Tue Aug 12 23:37:15 2014
@@ -40,13 +40,14 @@ public class TestBooleanUnevenly extends
   public static final String field = "field";
   private static Directory directory;
 
-  private static int count1 = 0;
+  private static int count1;
 
   @BeforeClass
   public static void beforeClass() throws Exception {
     directory = newDirectory();
     RandomIndexWriter w = new RandomIndexWriter(random(), directory, new MockAnalyzer(random()));
     Document doc;
+    count1 = 0;
     for (int i=0;i<2;i++) {
       for (int j=0;j<2048;j++) {
         doc = new Document();
@@ -102,8 +103,8 @@ public class TestBooleanUnevenly extends
     ScoreDoc[] hits2 = tops2.scoreDocs;
     int hitsNum2 = tops2.totalHits;
 
-    assertEquals(hitsNum1, count1);
-    assertEquals(hitsNum2, count1);
+    assertEquals(count1, hitsNum1);
+    assertEquals(count1, hitsNum2);
     CheckHits.checkEqual(query, hits1, hits2);
   }
 
@@ -125,8 +126,8 @@ public class TestBooleanUnevenly extends
     ScoreDoc[] hits2 = tops2.scoreDocs;
     int hitsNum2 = tops2.totalHits;
 
-    assertEquals(hitsNum1, count1);
-    assertEquals(hitsNum2, count1);
+    assertEquals(count1, hitsNum1);
+    assertEquals(count1, hitsNum2);
     CheckHits.checkEqual(query, hits1, hits2);
   }
 }



Mime
View raw message