From 70bcd2c54e8f26ee67372dffa56a86ae9701e843 Mon Sep 17 00:00:00 2001 From: Cyrill Schumacher Date: Wed, 27 Sep 2017 20:37:02 +0200 Subject: [PATCH] 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 Reviewed-by: Daniel Theophanes Run-TryBot: David Crawshaw TryBot-Result: Gobot Gobot --- src/database/sql/convert_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/database/sql/convert_test.go b/src/database/sql/convert_test.go index cfe52d7f548..169ecaed6f8 100644 --- a/src/database/sql/convert_test.go +++ b/src/database/sql/convert_test.go @@ -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)) }