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

Method Len

assert/assertion_forward.go:949–954  ·  assert/assertion_forward.go::Assertions.Len

Len asserts that the specified object has specific length. Len also fails if the object has a type that len() not accept. a.Len(mySlice, 3)

(object interface{}, length int, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

947//
948// a.Len(mySlice, 3)
949func (a *Assertions) Len(object interface{}, length int, msgAndArgs ...interface{}) bool {
950 if h, ok := a.t.(tHelper); ok {
951 h.Helper()
952 }
953 return Len(a.t, object, length, msgAndArgs...)
954}
955
956// Lenf asserts that the specified object has specific length.
957// Lenf also fails if the object has a type that len() not accept.

Callers 12

isOrderedFunction · 0.45
TestLenWrapperFunction · 0.45
copyExportedFieldsFunction · 0.45
isEmptyValueFunction · 0.45
getLenFunction · 0.45
containsElementFunction · 0.45
SubsetFunction · 0.45
NotSubsetFunction · 0.45
diffListsFunction · 0.45
InDeltaSliceFunction · 0.45
InDeltaMapValuesFunction · 0.45
InEpsilonSliceFunction · 0.45

Calls 2

LenFunction · 0.70
HelperMethod · 0.65

Tested by 1

TestLenWrapperFunction · 0.36