aboutsummaryrefslogtreecommitdiffstats
path: root/formats/index/decoder_test.go
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2016-10-31 19:44:29 +0000
committerGitHub <noreply@github.com>2016-10-31 19:44:29 +0000
commit6b7464a22c6177d9e0cf96e1aaaae13c127c3149 (patch)
tree70ac03894fafe43deb5b62ba18afa45f79507695 /formats/index/decoder_test.go
parent5078f52a9f2217027b0f475d5a91e677b3228588 (diff)
downloadgo-git-6b7464a22c6177d9e0cf96e1aaaae13c127c3149.tar.gz
format: index encoder and index decoder improvements (#105)
Diffstat (limited to 'formats/index/decoder_test.go')
-rw-r--r--formats/index/decoder_test.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/formats/index/decoder_test.go b/formats/index/decoder_test.go
index cf4c872..a05417d 100644
--- a/formats/index/decoder_test.go
+++ b/formats/index/decoder_test.go
@@ -26,7 +26,7 @@ func (s *IdxfileSuite) TestDecode(c *C) {
c.Assert(err, IsNil)
c.Assert(idx.Version, Equals, uint32(2))
- c.Assert(idx.EntryCount, Equals, uint32(9))
+ c.Assert(idx.Entries, HasLen, 9)
}
func (s *IdxfileSuite) TestDecodeEntries(c *C) {
@@ -97,7 +97,7 @@ func (s *IdxfileSuite) TestDecodeMergeConflict(c *C) {
c.Assert(err, IsNil)
c.Assert(idx.Version, Equals, uint32(2))
- c.Assert(idx.EntryCount, Equals, uint32(13))
+ c.Assert(idx.Entries, HasLen, 13)
expected := []struct {
Stage Stage
@@ -136,7 +136,7 @@ func (s *IdxfileSuite) TestDecodeExtendedV3(c *C) {
c.Assert(err, IsNil)
c.Assert(idx.Version, Equals, uint32(3))
- c.Assert(idx.EntryCount, Equals, uint32(11))
+ c.Assert(idx.Entries, HasLen, 11)
c.Assert(idx.Entries[6].Name, Equals, "intent-to-add")
c.Assert(idx.Entries[6].IntentToAdd, Equals, true)
@@ -153,7 +153,7 @@ func (s *IdxfileSuite) TestDecodeResolveUndo(c *C) {
c.Assert(err, IsNil)
c.Assert(idx.Version, Equals, uint32(2))
- c.Assert(idx.EntryCount, Equals, uint32(8))
+ c.Assert(idx.Entries, HasLen, 8)
ru := idx.ResolveUndo
c.Assert(ru.Entries, HasLen, 2)
@@ -178,7 +178,7 @@ func (s *IdxfileSuite) TestDecodeV4(c *C) {
c.Assert(err, IsNil)
c.Assert(idx.Version, Equals, uint32(4))
- c.Assert(idx.EntryCount, Equals, uint32(11))
+ c.Assert(idx.Entries, HasLen, 11)
names := []string{
".gitignore", "CHANGELOG", "LICENSE", "binary.jpg", "go/example.go",