db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcai...@apache.org
Subject svn commit: r225831 - in /incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes: FirstSetOfTestValuesForCollection.java SecondSetOfTestValuesForCollection.java TestFieldsOfFloat.java
Date Thu, 28 Jul 2005 17:44:01 GMT
Author: mcaisse
Date: Thu Jul 28 10:43:52 2005
New Revision: 225831

URL: http://svn.apache.org/viewcvs?rev=225831&view=rev
Log:
JDO-104: Value is outside the range for the data type DOUBLE

Modified:
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/FirstSetOfTestValuesForCollection.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/SecondSetOfTestValuesForCollection.java
    incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestFieldsOfFloat.java

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/FirstSetOfTestValuesForCollection.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/FirstSetOfTestValuesForCollection.java?rev=225831&r1=225830&r2=225831&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/FirstSetOfTestValuesForCollection.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/FirstSetOfTestValuesForCollection.java
Thu Jul 28 10:43:52 2005
@@ -19,6 +19,7 @@
 import java.util.*;
 import java.math.*;
 
+import org.apache.jdo.tck.pc.fieldtypes.AllTypes;
 import org.apache.jdo.tck.pc.fieldtypes.SimpleClass;
 
 public class FirstSetOfTestValuesForCollection extends Hashtable {
@@ -97,19 +98,19 @@
     put("Byte", byteVector);
 
     Vector doubleVector = new Vector();
-    doubleVector.add(0, new Double(Double.MIN_VALUE));
-    doubleVector.add(1, new Double(Double.MAX_VALUE));
-    doubleVector.add(2, new Double(Double.MAX_VALUE - 20000));
-    doubleVector.add(3, new Double(Double.MAX_VALUE - 454545.436664));
-    doubleVector.add(4, new Double(Double.MAX_VALUE - 2323235.76764677));
+    doubleVector.add(0, new Double(AllTypes.DOUBLE_SMALLEST));
+    doubleVector.add(1, new Double(AllTypes.DOUBLE_LARGEST));
+    doubleVector.add(2, new Double(AllTypes.DOUBLE_LARGEST - 20000));
+    doubleVector.add(3, new Double(AllTypes.DOUBLE_LARGEST - 454545.436664));
+    doubleVector.add(4, new Double(AllTypes.DOUBLE_LARGEST - 2323235.76764677));
     put("Double", doubleVector);
 
     Vector floatVector = new Vector();
-    floatVector.add(0, new Float(Float.MIN_VALUE));
-    floatVector.add(1, new Float(Float.MAX_VALUE));
-    floatVector.add(2, new Float(Float.MAX_VALUE - 20000));
-    floatVector.add(3, new Float(Float.MAX_VALUE - 454545.434));
-    floatVector.add(4, new Float(Float.MAX_VALUE - 565656.43434));
+    floatVector.add(0, new Float(AllTypes.FLOAT_SMALLEST));
+    floatVector.add(1, new Float(AllTypes.FLOAT_LARGEST));
+    floatVector.add(2, new Float(AllTypes.FLOAT_LARGEST - 20000));
+    floatVector.add(3, new Float(AllTypes.FLOAT_LARGEST - 454545.434));
+    floatVector.add(4, new Float(AllTypes.FLOAT_LARGEST - 565656.43434));
     put("Float", floatVector);
 
     Vector integerVector = new Vector();

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/SecondSetOfTestValuesForCollection.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/SecondSetOfTestValuesForCollection.java?rev=225831&r1=225830&r2=225831&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/SecondSetOfTestValuesForCollection.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/SecondSetOfTestValuesForCollection.java
Thu Jul 28 10:43:52 2005
@@ -19,6 +19,7 @@
 import java.util.*;
 import java.math.*;
 
+import org.apache.jdo.tck.pc.fieldtypes.AllTypes;
 import org.apache.jdo.tck.pc.fieldtypes.SimpleClass;
 
 public class SecondSetOfTestValuesForCollection extends Hashtable {
@@ -98,19 +99,19 @@
     put("Byte", byteVector);
 
     Vector doubleVector = new Vector();
-    doubleVector.add(0, new Double(Double.MAX_VALUE - 343434));
-    doubleVector.add(1, new Double(Double.MIN_VALUE));
-    doubleVector.add(2, new Double(Double.MAX_VALUE));
-    doubleVector.add(3, new Double(Double.MAX_VALUE - 65423445.436664));
-    doubleVector.add(4, new Double(Double.MAX_VALUE - 7235.236764677));
+    doubleVector.add(0, new Double(AllTypes.DOUBLE_LARGEST - 343434));
+    doubleVector.add(1, new Double(AllTypes.DOUBLE_SMALLEST));
+    doubleVector.add(2, new Double(AllTypes.DOUBLE_LARGEST));
+    doubleVector.add(3, new Double(AllTypes.DOUBLE_LARGEST - 65423445.436664));
+    doubleVector.add(4, new Double(AllTypes.DOUBLE_LARGEST - 7235.236764677));
     put("Double", doubleVector);
 
     Vector floatVector = new Vector();
-    floatVector.add(0, new Float(Float.MAX_VALUE - 5452));
-    floatVector.add(1, new Float(Float.MIN_VALUE));
-    floatVector.add(2, new Float(Float.MAX_VALUE - 6564560.54));
-    floatVector.add(3, new Float(Float.MAX_VALUE));
-    floatVector.add(4, new Float(Float.MAX_VALUE - 9756.634));
+    floatVector.add(0, new Float(AllTypes.FLOAT_LARGEST - 5452));
+    floatVector.add(1, new Float(AllTypes.FLOAT_SMALLEST));
+    floatVector.add(2, new Float(AllTypes.FLOAT_LARGEST - 6564560.54));
+    floatVector.add(3, new Float(AllTypes.FLOAT_LARGEST));
+    floatVector.add(4, new Float(AllTypes.FLOAT_LARGEST - 9756.634));
     put("Float", floatVector);
 
     Vector integerVector = new Vector();

Modified: incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestFieldsOfFloat.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestFieldsOfFloat.java?rev=225831&r1=225830&r2=225831&view=diff
==============================================================================
--- incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestFieldsOfFloat.java
(original)
+++ incubator/jdo/trunk/tck20/test/java/org/apache/jdo/tck/models/fieldtypes/TestFieldsOfFloat.java
Thu Jul 28 10:43:52 2005
@@ -20,6 +20,7 @@
 import javax.jdo.Transaction;
 
 import org.apache.jdo.tck.JDO_Test;
+import org.apache.jdo.tck.pc.fieldtypes.AllTypes;
 import org.apache.jdo.tck.pc.fieldtypes.FieldsOfFloat;
 import org.apache.jdo.tck.util.BatchTestRunner;
 
@@ -75,8 +76,8 @@
         Transaction tx = pm.currentTransaction();
         try { 
             int i, n;
-            Float firstValue = new Float(Float.MIN_VALUE);
-            Float secondValue = new Float(Float.MAX_VALUE);
+            Float firstValue = new Float(AllTypes.FLOAT_SMALLEST);
+            Float secondValue = new Float(AllTypes.FLOAT_LARGEST);
             tx.begin();
             FieldsOfFloat pi = new FieldsOfFloat();
             pi.identifier = 1;



Mime
View raw message