Use require/assert.Empty instead of require/assert.Len(t, X, 0) (#13413)

This commit is contained in:
Jesús Espino
2019-12-22 12:35:31 +01:00
committed by GitHub
parent fdd1ae974f
commit b3e49ec45c
35 changed files with 203 additions and 202 deletions

View File

@@ -517,7 +517,7 @@ func TestMergeWithSlices(t *testing.T) {
// of course this won't change merged, even if it did copy... but just in case.
m2 = append(m2, "test")
assert.Len(t, m2, 1)
assert.Len(t, merged, 0)
assert.Empty(t, merged)
})
t.Run("slice is not copied. change in patch will not affect merged", func(t *testing.T) {

View File

@@ -23,7 +23,7 @@ func TestStringArrayIntersection(t *testing.T) {
"def",
}
assert.Len(t, StringArrayIntersection(a, b), 0)
assert.Empty(t, StringArrayIntersection(a, b))
assert.Len(t, StringArrayIntersection(a, c), 1)
}