MCPcopy
hub / github.com/stretchr/testify / isEmpty

Function isEmpty

assert/assertions.go:750–757  ·  view source on GitHub ↗

isEmpty gets whether the specified object is considered empty or not.

(object interface{})

Source from the content-addressed store, hash-verified

748
749// isEmpty gets whether the specified object is considered empty or not.
750func isEmpty(object interface{}) bool {
751 // get nil case out of the way
752 if object == nil {
753 return true
754 }
755
756 return isEmptyValue(reflect.ValueOf(object))
757}
758
759// isEmptyValue gets whether the specified reflect.Value is considered empty or not.
760func isEmptyValue(objValue reflect.Value) bool {

Callers 6

Test_isEmptyFunction · 0.85
Benchmark_isEmptyFunction · 0.85
EmptyFunction · 0.85
NotEmptyFunction · 0.85
ElementsMatchFunction · 0.85
NotElementsMatchFunction · 0.85

Calls 1

isEmptyValueFunction · 0.85

Tested by 2

Test_isEmptyFunction · 0.68
Benchmark_isEmptyFunction · 0.68