From 28e90f7d3a7445b4ed947a4d20c7351620d07e6f Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Tue, 10 Feb 2015 13:53:09 -0700 Subject: [PATCH] Unit test passing --- spongy/readwritecloserwrapper_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spongy/readwritecloserwrapper_test.go b/spongy/readwritecloserwrapper_test.go index 7f49d35..de8278b 100644 --- a/spongy/readwritecloserwrapper_test.go +++ b/spongy/readwritecloserwrapper_test.go @@ -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") }