Commit 70bcd2c5 authored by Cyrill Schumacher's avatar Cyrill Schumacher Committed by Daniel Theophanes

database/sql: TestConversions add forgotten fields wantbytes and wantraw

The fields wantbytes and wantraw in the test struct `conversionTest` has
been forgotten to include in the TestConversions function.

Change-Id: I6dab69e76de3799a1bbf9fa09a15607e55172114
Reviewed-on: https://go-review.googlesource.com/66610Reviewed-by: 's avatarDavid Crawshaw <crawshaw@golang.org>
Reviewed-by: 's avatarDaniel Theophanes <kardianos@gmail.com>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent ecff9431
......@@ -222,6 +222,12 @@ func TestConversions(t *testing.T) {
if ct.wantstr != "" && ct.wantstr != scanstr {
errf("want string %q, got %q", ct.wantstr, scanstr)
}
if ct.wantbytes != nil && string(ct.wantbytes) != string(scanbytes) {
errf("want byte %q, got %q", ct.wantbytes, scanbytes)
}
if ct.wantraw != nil && string(ct.wantraw) != string(scanraw) {
errf("want RawBytes %q, got %q", ct.wantraw, scanraw)
}
if ct.wantint != 0 && ct.wantint != intValue(ct.d) {
errf("want int %d, got %d", ct.wantint, intValue(ct.d))
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment