aboutsummaryrefslogtreecommitdiff
path: root/vendor/github.com/stretchr/testify/assert
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2022-06-21 12:10:35 +0000
committerGitHub <noreply@github.com>2022-06-21 12:10:35 +0000
commitcfba09f6826f96e8882015d469c8a4e4fd870890 (patch)
tree04827ac680245630908c8767950c5a178a5b074f /vendor/github.com/stretchr/testify/assert
parentfe8e536328eef61f0cf7ffd42b74d4e5be4654ee (diff)
downloadpodman-cfba09f6826f96e8882015d469c8a4e4fd870890.tar.gz
podman-cfba09f6826f96e8882015d469c8a4e4fd870890.tar.bz2
podman-cfba09f6826f96e8882015d469c8a4e4fd870890.zip
Bump github.com/stretchr/testify from 1.7.2 to 1.7.4
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.2 to 1.7.4. - [Release notes](https://github.com/stretchr/testify/releases) - [Commits](https://github.com/stretchr/testify/compare/v1.7.2...v1.7.4) --- updated-dependencies: - dependency-name: github.com/stretchr/testify dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/stretchr/testify/assert')
-rw-r--r--vendor/github.com/stretchr/testify/assert/assertions.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/vendor/github.com/stretchr/testify/assert/assertions.go b/vendor/github.com/stretchr/testify/assert/assertions.go
index 0357b2231..580fdea4c 100644
--- a/vendor/github.com/stretchr/testify/assert/assertions.go
+++ b/vendor/github.com/stretchr/testify/assert/assertions.go
@@ -563,16 +563,17 @@ func isEmpty(object interface{}) bool {
switch objValue.Kind() {
// collection types are empty when they have no element
- case reflect.Array, reflect.Chan, reflect.Map, reflect.Slice:
+ case reflect.Chan, reflect.Map, reflect.Slice:
return objValue.Len() == 0
- // pointers are empty if nil or if the value they point to is empty
+ // pointers are empty if nil or if the value they point to is empty
case reflect.Ptr:
if objValue.IsNil() {
return true
}
deref := objValue.Elem().Interface()
return isEmpty(deref)
- // for all other types, compare against the zero value
+ // for all other types, compare against the zero value
+ // array types are empty when they match their zero-initialized state
default:
zero := reflect.Zero(objValue.Type())
return reflect.DeepEqual(object, zero.Interface())