Lenf asserts that the specified object has specific length. Lenf also fails if the object has a type that len() not accept. require.Lenf(t, mySlice, 3, "error message %s", "formatted")
(t TestingT, object interface{}, length int, msg string, args ...interface{})
| 1208 | // |
| 1209 | // require.Lenf(t, mySlice, 3, "error message %s", "formatted") |
| 1210 | func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) { |
| 1211 | if h, ok := t.(tHelper); ok { |
| 1212 | h.Helper() |
| 1213 | } |
| 1214 | if assert.Lenf(t, object, length, msg, args...) { |
| 1215 | return |
| 1216 | } |
| 1217 | t.FailNow() |
| 1218 | } |
| 1219 | |
| 1220 | // Less asserts that the first element is less than the second |
| 1221 | // |