1
0
Fork 0

Protect against future changes

master
Philip O'Toole 2 years ago
parent d3d4754a9a
commit a97c803489

@ -4,6 +4,7 @@ import (
"encoding/json"
"fmt"
"reflect"
"strconv"
"testing"
)
@ -172,6 +173,12 @@ func Test_SingleParameterizedRequestNull(t *testing.T) {
}
func Test_SingleNamedParameterizedRequest(t *testing.T) {
if _, err := strconv.ParseInt(string("1.23"), 10, 64); err == nil {
// Just be sure that strconv.ParseInt fails on float, since
// the internal implementation of ParseRequest relies on it.
t.Fatal("strconv.ParseInt should fail on float")
}
s := "SELECT * FROM foo WHERE bar=:bar AND qux=:qux"
b := []byte(fmt.Sprintf(`[["%s", %s]]`, s, mustJSONMarshal(map[string]interface{}{"bar": 3, "qux": "some string", "baz": 3.1457})))

Loading…
Cancel
Save