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

Method Len

require/require_forward.go:950–955  ·  view source on GitHub ↗

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

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

Callers 4

analyzeCodeFunction · 0.45
ParamsMethod · 0.45
ForwardedParamsMethod · 0.45
assertOptsFunction · 0.45

Calls 2

LenFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected