]> Cypherpunks repositories - gostls13.git/commitdiff
src: fix a couple of govet-discovered errors.
authorRob Pike <r@golang.org>
Wed, 14 Sep 2011 20:29:31 +0000 (13:29 -0700)
committerRob Pike <r@golang.org>
Wed, 14 Sep 2011 20:29:31 +0000 (13:29 -0700)
R=golang-dev, rsc
CC=golang-dev
https://golang.org/cl/5021042

src/pkg/exp/regexp/exec_test.go
src/pkg/image/png/reader_test.go

index e8eaff54120e848e78ad98a57afe33fbbd359723..3adf8484ca40c8e11c64586258064be866bb7236 100644 (file)
@@ -558,7 +558,7 @@ Reading:
                        }
                        have := re.FindStringSubmatchIndex(text)
                        if (len(have) > 0) != match {
-                               t.Errorf("%s:%d: %#q.Match(%#q) = %v, but %#q.FindSubmatchIndex(%#q) = %v", file, lineno, pattern, text, match, text, have)
+                               t.Errorf("%s:%d: %#q.Match(%#q) = %v, but %#q.FindSubmatchIndex(%#q) = %v", file, lineno, pattern, text, match, pattern, text, have)
                                continue Testing
                        }
                        if len(have) > len(pos) {
index 208843190583920b5d1a37bca6ab9d15b4f4e5f8..1b7c2de718b512cd6ca9c673ffbbd493ba10a5ce 100644 (file)
@@ -262,7 +262,7 @@ func TestReaderError(t *testing.T) {
                        t.Errorf("decoding %s: %s, want %s", tt.file, err, tt.err)
                }
                if img != nil {
-                       t.Errorf("decoding %s: have image + error")
+                       t.Errorf("decoding %s: have image + error", tt.file)
                }
        }
 }