]> Cypherpunks repositories - gostls13.git/commitdiff
a few more errors caught by the print checker
authorRob Pike <r@golang.org>
Wed, 8 Dec 2010 21:25:14 +0000 (16:25 -0500)
committerRob Pike <r@golang.org>
Wed, 8 Dec 2010 21:25:14 +0000 (16:25 -0500)
R=rsc
CC=golang-dev
https://golang.org/cl/3431046

src/pkg/archive/tar/reader_test.go
src/pkg/archive/tar/writer_test.go
src/pkg/flag/flag_test.go

index cfc25850776fbb825cfd239a4189c2b13f04917d..aa4c797fb6a6535f36dff7de7b912417feea7148 100644 (file)
@@ -136,7 +136,7 @@ testLoop:
                        break
                }
                if hdr != nil || err != nil {
-                       t.Errorf("test %d: Unexpected entry or error: hdr=%v err=%v", i, err)
+                       t.Errorf("test %d: Unexpected entry or error: hdr=%v err=%v", i, hdr, err)
                }
                f.Close()
        }
index 24db9b821bedf4c2cb46d9596e0af198bfa89142..48b8911400514dec86b93578cfb2fd42e82586a3 100644 (file)
@@ -141,7 +141,7 @@ testLoop:
                        }
                }
                if err := tw.Close(); err != nil {
-                       t.Errorf("test %d: Failed closing archive: %v", err)
+                       t.Errorf("test %d: Failed closing archive: %v", i, err)
                        continue testLoop
                }
 
index abde1e0db7ee4ad416b6b35fab5830c21f24928b..4ebb7380582eede71e3022105dd01b45d13753a8 100644 (file)
@@ -196,6 +196,6 @@ func TestChangingArgs(t *testing.T) {
        args := Args()
 
        if !*before || cmd != "subcmd" || !*after || len(args) != 1 || args[0] != "args" {
-               t.Fatal("expected true subcmd true [args] got %v %v %v %v", *before, cmd, *after, args)
+               t.Fatalf("expected true subcmd true [args] got %v %v %v %v", *before, cmd, *after, args)
        }
 }