var common = require("./common")
  , odbc = require("../")
  , db = new odbc.Database()
  , assert = require("assert")
  , util = require('util')
  , count = 0
  ;
 
var sql = (common.dialect == 'sqlite' || common.dialect =='mysql')
  ? 'select cast(-1 as signed) as test;'
  : 'select cast(-1 as int) as test;'
  ;

db.open(common.connectionString, function(err) {
  console.error(err || "Connected")

  if (!err) {
    db.query(sql, function (err, results, more) {
      assert.equal(err, null);
      assert.equal(results[0].test, -1);

      db.close(function(err) { console.log(err || "Closed") })
    })
  }
});

@@ -268,46 +268,190 @@
 test
-;'%0A  : 'select cast(-1 as int) as test
+, cast(-2147483648 as signed) as test2, cast(2147483647 as signed) as test3;'%0A  : 'select cast(-1 as int) as test, cast(-2147483648 as int) as test2, cast(2147483647 as int) as test3
 ;'%0A 
@@ -600,24 +600,53 @@
 ts, more) %7B%0A
+      console.log(results);%0A%0A
       assert
@@ -664,16 +664,16 @@
  null);%0A
-
       as
@@ -704,16 +704,117 @@
 st, -1);
+%0A      assert.equal(results%5B0%5D.test2, -2147483648);%0A      assert.equal(results%5B0%5D.test3, 2147483647);
 %0A%0A      

Update test to include min and max of integer range