db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1450695 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/InPredicateTest.java
Date Wed, 27 Feb 2013 09:45:32 GMT
Author: kahatlen
Date: Wed Feb 27 09:45:32 2013
New Revision: 1450695

URL: http://svn.apache.org/r1450695
Log:
DERBY-6017: IN lists with mixed types may return wrong results

Make the test check numeric values rather than the string
representation of the values. This should make the test less likely
to fail if the string representation of floating point numbers is
different on a platform.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/InPredicateTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/InPredicateTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/InPredicateTest.java?rev=1450695&r1=1450694&r2=1450695&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/InPredicateTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/InPredicateTest.java
Wed Feb 27 09:45:32 2013
@@ -161,8 +161,12 @@ public class InPredicateTest extends Bas
                         "(2147483645, 2147483645, 2147483645), " +
                         "(2147483645, 2147483645, 0)");
 
-        String[][] expectedRows = {
-            { "2147483645", "2.14748365E9", "2.14748365E9" }
+        Object[][] expectedRows = {
+            {
+                new Integer(2147483645),
+                new Float(2.14748365E9f),
+                new Float(2.14748365E9f),
+            }
         };
 
         // The first query used to return two rows. However, the next two
@@ -172,14 +176,14 @@ public class InPredicateTest extends Bas
 
         JDBC.assertFullResultSet(
             s.executeQuery("select * from t3 where r1 in (i1, r2)"),
-            expectedRows);
+            expectedRows, false);
 
         JDBC.assertFullResultSet(
             s.executeQuery("select * from t3 where r1 in (values i1, r2)"),
-            expectedRows);
+            expectedRows, false);
 
         JDBC.assertFullResultSet(
             s.executeQuery("select * from t3 where r1 = any (values i1, r2)"),
-            expectedRows);
+            expectedRows, false);
     }
 }



Mime
View raw message