diff options
Diffstat (limited to 'modules/git')
-rw-r--r-- | modules/git/repo_attribute_test.go | 4 | ||||
-rw-r--r-- | modules/git/repo_commit_test.go | 2 | ||||
-rw-r--r-- | modules/git/repo_tag_test.go | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/modules/git/repo_attribute_test.go b/modules/git/repo_attribute_test.go index f88ae95407..350b69dd25 100644 --- a/modules/git/repo_attribute_test.go +++ b/modules/git/repo_attribute_test.go @@ -19,7 +19,7 @@ func Test_nulSeparatedAttributeWriter_ReadAttribute(t *testing.T) { n, err := wr.Write([]byte(testStr)) - assert.Equal(t, n, len(testStr)) + assert.Len(t, testStr, n) assert.NoError(t, err) select { case attr := <-wr.ReadAttribute(): @@ -32,7 +32,7 @@ func Test_nulSeparatedAttributeWriter_ReadAttribute(t *testing.T) { // Write a second attribute again n, err = wr.Write([]byte(testStr)) - assert.Equal(t, n, len(testStr)) + assert.Len(t, testStr, n) assert.NoError(t, err) select { diff --git a/modules/git/repo_commit_test.go b/modules/git/repo_commit_test.go index 729fb0ba10..fee145e924 100644 --- a/modules/git/repo_commit_test.go +++ b/modules/git/repo_commit_test.go @@ -97,6 +97,6 @@ func TestRepository_CommitsBetweenIDs(t *testing.T) { for i, c := range cases { commits, err := bareRepo1.CommitsBetweenIDs(c.NewID, c.OldID) assert.NoError(t, err) - assert.Equal(t, c.ExpectedCommits, len(commits), "case %d", i) + assert.Len(t, commits, c.ExpectedCommits, "case %d", i) } } diff --git a/modules/git/repo_tag_test.go b/modules/git/repo_tag_test.go index 8ccfec3eb2..fb6a7cdd1a 100644 --- a/modules/git/repo_tag_test.go +++ b/modules/git/repo_tag_test.go @@ -26,7 +26,7 @@ func TestRepository_GetTags(t *testing.T) { return } assert.Len(t, tags, 2) - assert.Equal(t, len(tags), total) + assert.Len(t, tags, total) assert.EqualValues(t, "signed-tag", tags[0].Name) assert.EqualValues(t, "36f97d9a96457e2bab511db30fe2db03893ebc64", tags[0].ID.String()) assert.EqualValues(t, "tag", tags[0].Type) |