From eafa1b9426196ba1de7f8c88aa47a8366c1cc95d Mon Sep 17 00:00:00 2001 From: Vincent Batts Date: Tue, 24 Feb 2015 15:49:21 -0500 Subject: [PATCH] tar/storage: fix the test --- tar/storage/packer_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tar/storage/packer_test.go b/tar/storage/packer_test.go index 031049e..42cd88a 100644 --- a/tar/storage/packer_test.go +++ b/tar/storage/packer_test.go @@ -39,8 +39,8 @@ func TestJsonPackerUnpacker(t *testing.T) { } }() - t.Errorf("%#v", b.String()) b = bytes.NewBuffer(b.Bytes()) + entries := Entries{} func() { jup := NewJsonUnpacker(b) for { @@ -51,8 +51,12 @@ func TestJsonPackerUnpacker(t *testing.T) { } t.Error(err) } - t.Errorf("%#v", entry) + entries = append(entries, *entry) + t.Logf("got %#v", entry) } }() + if len(entries) != len(e) { + t.Errorf("expected %d entries, got %d", len(e), len(entries)) + } }