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{})
| 1165 | // |
| 1166 | // assert.Lenf(t, mySlice, 3, "error message %s", "formatted") |
| 1167 | func Lenf(t TestingT, object interface{}, length int, msg string, args ...interface{}) { |
| 1168 | if h, ok := t.(tHelper); ok { |
| 1169 | h.Helper() |
| 1170 | } |
| 1171 | if assert.Lenf(t, object, length, msg, args...) { |
| 1172 | return |
| 1173 | } |
| 1174 | t.FailNow() |
| 1175 | } |
| 1176 | |
| 1177 | // Less asserts that the first element is less than the second |
| 1178 | // |