From 1b2e5bdfc90e83319357cff364a074b48b626ee8 Mon Sep 17 00:00:00 2001 From: Ryan Culpepper Date: Fri, 27 Dec 2013 23:46:44 -0500 Subject: [PATCH] expand DECIMAL tests for mysql --- pkgs/db-pkgs/db-test/tests/db/db/sql-types.rkt | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pkgs/db-pkgs/db-test/tests/db/db/sql-types.rkt b/pkgs/db-pkgs/db-test/tests/db/db/sql-types.rkt index 1adc9138d0..7f3d793e6f 100644 --- a/pkgs/db-pkgs/db-test/tests/db/db/sql-types.rkt +++ b/pkgs/db-pkgs/db-test/tests/db/db/sql-types.rkt @@ -74,7 +74,7 @@ ((blob) "select cast(? as binary)") ;; ??? ((integer) "select cast(? as signed integer)") ((real) "select (? * 1.0)") - ((numeric) "select cast(? as decimal)") + ((decimal numeric) "select cast(? as decimal(40,10))") ((date) "select cast(? as date)") ((time) "select cast(? as time)") ((datetime) "select cast(? as datetime)") @@ -359,12 +359,22 @@ (check-roundtrip c 0) (check-roundtrip c 10) (check-roundtrip c -5) - (unless (TESTFLAGS 'odbc 'ismy) - (check-roundtrip c 12345678901234567890) + (unless (TESTFLAGS 'odbc) + (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/40) - (check-roundtrip c #e1234567890.0987654321) (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)) (when (supported? 'numeric-infinities) (check-roundtrip c +nan.0))))))