diff options
Diffstat (limited to 'formats/packfile/decoder_test.go')
-rw-r--r-- | formats/packfile/decoder_test.go | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/formats/packfile/decoder_test.go b/formats/packfile/decoder_test.go index fe25ee4..8c73b4e 100644 --- a/formats/packfile/decoder_test.go +++ b/formats/packfile/decoder_test.go @@ -28,10 +28,10 @@ func (s *ReaderSuite) TestReadPackfile(c *C) { data, _ := base64.StdEncoding.DecodeString(packFileWithEmptyObjects) f := bytes.NewReader(data) r := NewStream(f) - d := NewDecoder(r) - sto := memory.NewStorage() - err := d.Decode(sto.ObjectStorage()) + d := NewDecoder(r, sto.ObjectStorage()) + + err := d.Decode() c.Assert(err, IsNil) AssertObjects(c, sto, []string{ @@ -61,10 +61,10 @@ func (s *ReaderSuite) testReadPackfileGitFixture(c *C, file string, format Forma f, err := os.Open(file) c.Assert(err, IsNil) r := NewSeekable(f) - d := NewDecoder(r) - sto := memory.NewStorage() - err = d.Decode(sto.ObjectStorage()) + d := NewDecoder(r, sto.ObjectStorage()) + + err = d.Decode() c.Assert(err, IsNil) AssertObjects(c, sto, []string{ @@ -170,10 +170,10 @@ func readFromFile(c *C, file string, format Format) *memory.ObjectStorage { f, err := os.Open(file) c.Assert(err, IsNil) r := NewSeekable(f) - d := NewDecoder(r) - sto := memory.NewStorage() - err = d.Decode(sto.ObjectStorage()) + d := NewDecoder(r, sto.ObjectStorage()) + + err = d.Decode() c.Assert(err, IsNil) return sto.ObjectStorage().(*memory.ObjectStorage) |