Skip to content

Commit

Permalink
adding a test for big numbers that render in javascript badly
Browse files Browse the repository at this point in the history
  • Loading branch information
freeeve committed Feb 21, 2014
1 parent 6a6bbdb commit e5abffa
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion driver_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ package cq_test

import (
"database/sql"
. "launchpad.net/gocheck"
"log"
"testing"
. "launchpad.net/gocheck"
)

// This file is meant to hold integration tests where cq must be imported
Expand Down Expand Up @@ -212,6 +212,15 @@ func (s *DriverSuite) TestScanBigInt64(c *C) {
c.Assert(i64, Equals, int64(123456789101112))
}

func (s *DriverSuite) TestScanBigInt64FloatBug(c *C) {
rows := prepareAndQuery("return 23371710262672408")
rows.Next()
var i64 int64
err := rows.Scan(&i64)
c.Assert(err, IsNil)
c.Assert(i64, Equals, int64(23371710262672408))
}

func (s *DriverSuite) TestExecNilRows(c *C) {
db := testConn()
db.Exec("...")
Expand Down

0 comments on commit e5abffa

Please sign in to comment.