db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r178838 - in /incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/floattypes.out master/j9_13/floattypes.out tests/lang/floattypes.sql
Date Fri, 27 May 2005 23:06:14 GMT
Author: djd
Date: Fri May 27 16:06:14 2005
New Revision: 178838

URL: http://svn.apache.org/viewcvs?rev=178838&view=rev
Log:
Add some formatting tests for String to DECIMAL.

Modified:
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/floattypes.out
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/floattypes.out
    incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/floattypes.out
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/floattypes.out?rev=178838&r1=178837&r2=178838&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/floattypes.out
(original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/floattypes.out
Fri May 27 16:06:14 2005
@@ -2457,4 +2457,66 @@
 0.01234000000  
 0.12340000000  
 1.23400000000  
+ij> -- =====================================================
+-- some formatting tests
+values cast ('1e+0' as DECIMAL(6,2));
+1        
+---------
+1.00     
+ij> values cast ('+-1e+1' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('-1e+1' as DECIMAL(6,2));
+1        
+---------
+-10.00   
+ij> values cast ('-1e-1' as DECIMAL(6,2));
+1        
+---------
+-0.10    
+ij> values cast ('-1e-+1' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('-1e--1' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('1.0e' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('1.0e+' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('1.0e-' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('1.0ee' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('123.' as DECIMAL(6,2));
+1        
+---------
+123.00   
+ij> values cast ('1e' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('1e1.0' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('.3' as DECIMAL(6,2));
+1        
+---------
+0.30     
+ij> values cast ('' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
 ij> 

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/floattypes.out
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/floattypes.out?rev=178838&r1=178837&r2=178838&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/floattypes.out
(original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/j9_13/floattypes.out
Fri May 27 16:06:14 2005
@@ -2457,4 +2457,66 @@
 0.01234000000  
 0.12340000000  
 1.23400000000  
+ij> -- =====================================================
+-- some formatting tests
+values cast ('1e+0' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('+-1e+1' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('-1e+1' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('-1e-1' as DECIMAL(6,2));
+1        
+---------
+-0.10    
+ij> values cast ('-1e-+1' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('-1e--1' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('1.0e' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('1.0e+' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('1.0e-' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('1.0ee' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('123.' as DECIMAL(6,2));
+1        
+---------
+123.00   
+ij> values cast ('1e' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('1e1.0' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
+ij> values cast ('.3' as DECIMAL(6,2));
+1        
+---------
+0.30     
+ij> values cast ('' as DECIMAL(6,2));
+1        
+---------
+ERROR 22018: Invalid character string format for type DECIMAL.
 ij> 

Modified: incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql
URL: http://svn.apache.org/viewcvs/incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql?rev=178838&r1=178837&r2=178838&view=diff
==============================================================================
--- incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql
(original)
+++ incubator/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/floattypes.sql
Fri May 27 16:06:14 2005
@@ -1199,4 +1199,20 @@
 select d from tiger order by 1;
 
 
-
+-- =====================================================
+-- some formatting tests
+values cast ('1e+0' as DECIMAL(6,2));
+values cast ('+-1e+1' as DECIMAL(6,2));
+values cast ('-1e+1' as DECIMAL(6,2));
+values cast ('-1e-1' as DECIMAL(6,2));
+values cast ('-1e-+1' as DECIMAL(6,2));
+values cast ('-1e--1' as DECIMAL(6,2));
+values cast ('1.0e' as DECIMAL(6,2));
+values cast ('1.0e+' as DECIMAL(6,2));
+values cast ('1.0e-' as DECIMAL(6,2));
+values cast ('1.0ee' as DECIMAL(6,2));
+values cast ('123.' as DECIMAL(6,2));
+values cast ('1e' as DECIMAL(6,2));
+values cast ('1e1.0' as DECIMAL(6,2));
+values cast ('.3' as DECIMAL(6,2));
+values cast ('' as DECIMAL(6,2));
\ No newline at end of file



Mime
View raw message