db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r586265 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
Date Fri, 19 Oct 2007 05:05:40 GMT
Author: mamta
Date: Thu Oct 18 22:05:39 2007
New Revision: 586265

URL: http://svn.apache.org/viewvc?rev=586265&view=rev
Log:
DERBY-3135
Committing patch derby-3135-01-jsr169numerics-aa.diff generated by Rick. This patch enforces
the expectation that Derby will call getString() when reading DECIMAL/NUMERIC columns from
a table function. Thanks for the patch, Rick.


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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java?rev=586265&r1=586264&r2=586265&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/TableFunctionTest.java
Thu Oct 18 22:05:39 2007
@@ -130,6 +130,29 @@
         "getString " +          // VARCHAR
         "getBytes ";            // VARCHAR FOR BIT DATA
 
+    private static  final   String  EXPECTED_GET_XXX_CALLS_JSR169 =
+        "getLong " +            // BIGINT
+        "getBlob " +            // BLOB
+        "getString " +          // CHAR
+        "getBytes " +           // CHAR FOR BIT DATA
+        "getString " +          // CLOB
+        "getDate " +            // DATE
+        "getString " +      // DECIMAL
+        "getDouble " +          // DOUBLE
+        "getDouble " +          // DOUBLE PRECISION
+        "getFloat " +           // FLOAT( 23 )
+        "getDouble " +          // FLOAT( 24 )
+        "getInt " +             // INTEGER
+        "getString " +          // LONG VARCHAR
+        "getBytes " +           // LONG VARCHAR FOR BIT DATA
+        "getString " +      // NUMERIC
+        "getFloat " +           // REAL
+        "getShort " +           // SMALLINT
+        "getTime " +            // TIME
+        "getTimestamp " +       // TIMESTAMP
+        "getString " +          // VARCHAR
+        "getBytes ";            // VARCHAR FOR BIT DATA
+
     private static  final   String[]  STRING_TYPES =
     {
         "CHAR( 20 )",
@@ -1201,8 +1224,13 @@
         rs.close();
         ps.close();
         
-        println( StringArrayVTI.getXXXrecord() );
-        assertEquals( EXPECTED_GET_XXX_CALLS, actualGetXXXCalls );
+        println( actualGetXXXCalls );
+
+        String  expectedGetXXXCalls;
+        if ( JDBC.vmSupportsJSR169() )
+        { expectedGetXXXCalls = EXPECTED_GET_XXX_CALLS_JSR169; }
+        else { expectedGetXXXCalls = EXPECTED_GET_XXX_CALLS; }
+        assertEquals( expectedGetXXXCalls, actualGetXXXCalls );
     }
     
     /**



Mime
View raw message