You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@lucene.apache.org by ma...@apache.org on 2009/06/16 17:19:34 UTC

svn commit: r785252 - /lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java

Author: markrmiller
Date: Tue Jun 16 15:19:34 2009
New Revision: 785252

URL: http://svn.apache.org/viewvc?rev=785252&view=rev
Log:
add delta param to TestDocValues assertEqueals(string,float,float) calls

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

Modified: lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java
URL: http://svn.apache.org/viewvc/lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java?rev=785252&r1=785251&r2=785252&view=diff
==============================================================================
--- lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java (original)
+++ lucene/java/trunk/src/test/org/apache/lucene/search/function/TestDocValues.java Tue Jun 16 15:19:34 2009
@@ -18,6 +18,7 @@
  */
 
 import org.apache.lucene.util.LuceneTestCase;
+import junit.framework.Assert;
 
 /**
  * DocValues TestCase  
@@ -44,7 +45,7 @@
     float[] innerArray = new float[] { 1.0f, 2.0f, -1.0f, 100.0f };
     DocValuesTestImpl docValues = new DocValuesTestImpl(innerArray);
     assertEquals("-1.0f is the min value in the source array", -1.0f, docValues
-        .getMinValue());
+        .getMinValue(), 0);
 
     // test with without values - NaN
     innerArray = new float[] {};
@@ -57,18 +58,18 @@
     float[] innerArray = new float[] { 1.0f, 2.0f, -1.0f, 10.0f };
     DocValuesTestImpl docValues = new DocValuesTestImpl(innerArray);
     assertEquals("10.0f is the max value in the source array", 10.0f, docValues
-        .getMaxValue());
+        .getMaxValue(), 0);
 
     innerArray = new float[] { -3.0f, -1.0f, -100.0f };
     docValues = new DocValuesTestImpl(innerArray);
     assertEquals("-1.0f is the max value in the source array", -1.0f, docValues
-        .getMaxValue());
+        .getMaxValue(), 0);
 
     innerArray = new float[] { -3.0f, -1.0f, 100.0f, Float.MAX_VALUE,
         Float.MAX_VALUE - 1 };
     docValues = new DocValuesTestImpl(innerArray);
     assertEquals(Float.MAX_VALUE + " is the max value in the source array",
-        Float.MAX_VALUE, docValues.getMaxValue());
+        Float.MAX_VALUE, docValues.getMaxValue(), 0);
 
     // test with without values - NaN
     innerArray = new float[] {};
@@ -80,16 +81,16 @@
   public void testGetAverageValue() {
     float[] innerArray = new float[] { 1.0f, 1.0f, 1.0f, 1.0f };
     DocValuesTestImpl docValues = new DocValuesTestImpl(innerArray);
-    assertEquals("the average is 1.0f", 1.0f, docValues.getAverageValue());
+    assertEquals("the average is 1.0f", 1.0f, docValues.getAverageValue(), 0);
 
     innerArray = new float[] { 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f };
     docValues = new DocValuesTestImpl(innerArray);
-    assertEquals("the average is 3.5f", 3.5f, docValues.getAverageValue());
+    assertEquals("the average is 3.5f", 3.5f, docValues.getAverageValue(), 0);
 
     // test with negative values
     innerArray = new float[] { -1.0f, 2.0f };
     docValues = new DocValuesTestImpl(innerArray);
-    assertEquals("the average is 0.5f", 0.5f, docValues.getAverageValue());
+    assertEquals("the average is 0.5f", 0.5f, docValues.getAverageValue(), 0);
 
     // test with without values - NaN
     innerArray = new float[] {};