Unit test passing

This commit is contained in:
Neale Pickett 2015-02-10 13:53:09 -07:00
parent 29a9268df8
commit 28e90f7d3a
1 changed files with 2 additions and 2 deletions

View File

@ -12,7 +12,7 @@ func TestRWCWCat(t *testing.T) {
}
out := []byte("Hello, World\n")
p := make([]byte, 0, 50)
p := make([]byte, 50)
n, err := proc.Write(out)
if err != nil {
@ -29,7 +29,7 @@ func TestRWCWCat(t *testing.T) {
if n != len(out) {
t.Errorf("Wrong number of bytes in Read: wanted %d, got %d", len(out), n)
}
if 0 != bytes.Compare(p, out) {
if 0 != bytes.Compare(p[:n], out) {
t.Errorf("Mangled read")
}