From a928453d6961f07e6a12052b73abe4bb9a540148 Mon Sep 17 00:00:00 2001 From: brianc Date: Sat, 30 Oct 2010 21:04:03 -0500 Subject: [PATCH] integration tests for parsing types, failing on nulls --- .../integration/client/type-coercion-tests.js | 20 ++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/test/integration/client/type-coercion-tests.js b/test/integration/client/type-coercion-tests.js index 95cc37db..1edf5d7a 100644 --- a/test/integration/client/type-coercion-tests.js +++ b/test/integration/client/type-coercion-tests.js @@ -39,22 +39,32 @@ var testForTypeCoercion = function(type){ //TODO test for nulls var types = [{ name: 'integer', - values: [1, -1] + values: [1, -1, null] },{ name: 'smallint', - values: [-1, 0, 1] + values: [-1, 0, 1, null] },{ name: 'bigint', - values: [-10000, 0, 10000] + values: [-10000, 0, 10000, null] },{ name: 'varchar(5)', values: ['yo', '', 'zomg!', null] },{ name: 'oid', - values: [0, 204410] + values: [0, 204410, null] },{ name: 'bool', - values: [true, false] + values: [true, false, null] +},{ + //TODO get some actual huge numbers here + name: 'numeric', + values: [-12.34, 0, 12.34, null] +},{ + name: 'real', + values: [101.1, 0, -101.3, null] +},{ + name: 'double precision', + values: [-1.2, 0, 1.2, null] }]; types.forEach(testForTypeCoercion);