mirror of
https://github.com/golang/go
synced 2024-11-02 11:50:30 +00: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:
parent
ecff94311d
commit
70bcd2c54e
1 changed files with 6 additions and 0 deletions
|
@ -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))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue