summaryrefslogtreecommitdiff
path: root/src/pkg/io/multi_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/io/multi_test.go')
-rw-r--r--src/pkg/io/multi_test.go11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/pkg/io/multi_test.go b/src/pkg/io/multi_test.go
index 1b3589dde..eb717f7bc 100644
--- a/src/pkg/io/multi_test.go
+++ b/src/pkg/io/multi_test.go
@@ -5,11 +5,10 @@
package io_test
import (
- . "io"
"bytes"
"crypto/sha1"
"fmt"
- "os"
+ . "io"
"strings"
"testing"
)
@@ -26,7 +25,7 @@ func TestMultiReader(t *testing.T) {
buf = make([]byte, 20)
tests()
}
- expectRead := func(size int, expected string, eerr os.Error) {
+ expectRead := func(size int, expected string, eerr error) {
nread++
n, gerr := mr.Read(buf[0:size])
if n != len(expected) {
@@ -48,13 +47,13 @@ func TestMultiReader(t *testing.T) {
expectRead(2, "fo", nil)
expectRead(5, "o ", nil)
expectRead(5, "bar", nil)
- expectRead(5, "", os.EOF)
+ expectRead(5, "", EOF)
})
withFooBar(func() {
expectRead(4, "foo ", nil)
expectRead(1, "b", nil)
expectRead(3, "ar", nil)
- expectRead(1, "", os.EOF)
+ expectRead(1, "", EOF)
})
withFooBar(func() {
expectRead(5, "foo ", nil)
@@ -78,7 +77,7 @@ func TestMultiWriter(t *testing.T) {
t.Errorf("unexpected error: %v", err)
}
- sha1hex := fmt.Sprintf("%x", sha1.Sum())
+ sha1hex := fmt.Sprintf("%x", sha1.Sum(nil))
if sha1hex != "01cb303fa8c30a64123067c5aa6284ba7ec2d31b" {
t.Error("incorrect sha1 value")
}