1
0
mirror of https://github.com/golang/go synced 2024-11-26 20:11:26 -07:00

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/66610
Reviewed-by: David Crawshaw <crawshaw@golang.org>
Reviewed-by: Daniel Theophanes <kardianos@gmail.com>
Run-TryBot: David Crawshaw <crawshaw@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Cyrill Schumacher 2017-09-27 20:37:02 +02:00 committed by Daniel Theophanes
parent ecff94311d
commit 70bcd2c54e

View File

@ -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))
}