]> Cypherpunks repositories - gostls13.git/commitdiff
testing: fix build
authorRob Pike <r@golang.org>
Wed, 16 Mar 2011 17:12:25 +0000 (10:12 -0700)
committerRob Pike <r@golang.org>
Wed, 16 Mar 2011 17:12:25 +0000 (10:12 -0700)
Dependency on bufio crept in during last CL; this breaks the cycle.
Also add a missing '-' to the documentation.

R=rsc
CC=golang-dev
https://golang.org/cl/4274061

src/cmd/gotest/doc.go
src/pkg/bufio/bufio_test.go

index 517108629c467583428686f108b14e9acf66e076..04e426bab3923eda1b37611356a07b2d0e80e868 100644 (file)
@@ -42,7 +42,7 @@ The resulting binary, called (for amd64) 6.out, has several flags.
 
 Usage:
        6.out [-test.v] [-test.run pattern] [-test.bench pattern] \
-               [test.memprofile=prof.out] [-test.memprofilerate=1]
+               [-test.memprofile=prof.out] [-test.memprofilerate=1]
 
 The -test.v flag causes the tests to be logged as they run.  The
 -test.run flag causes only those tests whose names match the regular
index 059ca6dd223d91ea2a6d42bd989ccb9e1db580e3..8028e04dcd972dc6b51828afab7e36dcc9138a5c 100644 (file)
@@ -2,9 +2,10 @@
 // Use of this source code is governed by a BSD-style
 // license that can be found in the LICENSE file.
 
-package bufio
+package bufio_test
 
 import (
+       . "bufio"
        "bytes"
        "fmt"
        "io"
@@ -502,9 +503,8 @@ func TestWriteString(t *testing.T) {
        b.WriteString("7890")                      // easy after flush
        b.WriteString("abcdefghijklmnopqrstuvwxy") // hard
        b.WriteString("z")
-       b.Flush()
-       if b.err != nil {
-               t.Error("WriteString", b.err)
+       if err := b.Flush(); err != nil {
+               t.Error("WriteString", err)
        }
        s := "01234567890abcdefghijklmnopqrstuvwxyz"
        if string(buf.Bytes()) != s {