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

Function Lenf

assert/assertion_format.go:482–487  ·  view source on GitHub ↗

Lenf asserts that the specified object has specific length. Lenf also fails if the object has a type that len() not accept. assert.Lenf(t, mySlice, 3, "error message %s", "formatted")

(t TestingT, object interface{}, length int, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

480//
481// assert.Lenf(t, mySlice, 3, "error message %s", "formatted")
482func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) bool {
483 if h, ok := t.(tHelper); ok {
484 h.Helper()
485 }
486 return Len(t, object, length, append([]interface{}{msg}, args...)...)
487}
488
489// Lessf asserts that the first element is less than the second
490//

Callers 2

LenfFunction · 0.92
LenfMethod · 0.70

Calls 2

LenFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected