expand DECIMAL tests for mysql

This commit is contained in:
Ryan Culpepper 2013-12-27 23:46:44 -05:00
parent 756b110287
commit 1b2e5bdfc9

View File

@ -74,7 +74,7 @@
((blob) "select cast(? as binary)") ;; ??? ((blob) "select cast(? as binary)") ;; ???
((integer) "select cast(? as signed integer)") ((integer) "select cast(? as signed integer)")
((real) "select (? * 1.0)") ((real) "select (? * 1.0)")
((numeric) "select cast(? as decimal)") ((decimal numeric) "select cast(? as decimal(40,10))")
((date) "select cast(? as date)") ((date) "select cast(? as date)")
((time) "select cast(? as time)") ((time) "select cast(? as time)")
((datetime) "select cast(? as datetime)") ((datetime) "select cast(? as datetime)")
@ -359,12 +359,22 @@
(check-roundtrip c 0) (check-roundtrip c 0)
(check-roundtrip c 10) (check-roundtrip c 10)
(check-roundtrip c -5) (check-roundtrip c -5)
(unless (TESTFLAGS 'odbc 'ismy) (unless (TESTFLAGS 'odbc)
(check-roundtrip c 12345678901234567890) (check-roundtrip c 1234567890)
(check-roundtrip c -1234567890)
(check-roundtrip c #e12345.67809)
(check-roundtrip c #e-12345.67809)
(unless (TESTFLAGS 'mysql)
(check-roundtrip c 12345678901234567890)
(check-roundtrip c -12345678901234567890)
(check-roundtrip c #e1234567890.0987654321)
(check-roundtrip c #e-1234567890.0987654321))
(check-roundtrip c 1/2) (check-roundtrip c 1/2)
(check-roundtrip c 1/40) (check-roundtrip c 1/40)
(check-roundtrip c #e1234567890.0987654321)
(check-roundtrip c 1/10) (check-roundtrip c 1/10)
(check-roundtrip c -1/2)
(check-roundtrip c -1/40)
(check-roundtrip c -1/10)
(check-roundtrip c 1/400000)) (check-roundtrip c 1/400000))
(when (supported? 'numeric-infinities) (when (supported? 'numeric-infinities)
(check-roundtrip c +nan.0)))))) (check-roundtrip c +nan.0))))))