mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
parent
e48c0fb562
commit
d86ab015f7
45 changed files with 68 additions and 199 deletions
|
|
@ -132,7 +132,7 @@ func TestBasicOperations(t *testing.T) {
|
|||
buf.Truncate(0)
|
||||
check(t, "TestBasicOperations (3)", &buf, "")
|
||||
|
||||
n, err := buf.Write(Bytes(data[0:1]))
|
||||
n, err := buf.Write([]byte(data[0:1]))
|
||||
if n != 1 {
|
||||
t.Errorf("wrote 1 byte, but n == %d", n)
|
||||
}
|
||||
|
|
@ -144,7 +144,7 @@ func TestBasicOperations(t *testing.T) {
|
|||
buf.WriteByte(data[1])
|
||||
check(t, "TestBasicOperations (5)", &buf, "ab")
|
||||
|
||||
n, err = buf.Write(Bytes(data[2:26]))
|
||||
n, err = buf.Write([]byte(data[2:26]))
|
||||
if n != 24 {
|
||||
t.Errorf("wrote 25 bytes, but n == %d", n)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue