diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-09-05 07:59:20 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-09-05 07:59:20 +0200 |
commit | 65427f64599e9383ab926aed75fc02f2db32022d (patch) | |
tree | 5c81c00bc9dcfb54e0c6d0038ab2cbd8cddde389 /formats/packfile/decoder_test.go | |
parent | 440cfd96cf88ffc9d04bbd32ec8a3b1afb42144c (diff) | |
download | go-git-65427f64599e9383ab926aed75fc02f2db32022d.tar.gz |
core: ObjectStorage.Begin and TxObjectStorage
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) |