(t *testing.T, object interface{}, length int, msgAndArgs ...interface{})
| 227 | } |
| 228 | |
| 229 | func (a fatal) Len(t *testing.T, object interface{}, length int, msgAndArgs ...interface{}) { |
| 230 | t.Helper() |
| 231 | v := reflect.ValueOf(object) |
| 232 | switch v.Kind() { |
| 233 | case reflect.Array, reflect.Slice, reflect.Map, reflect.Chan, reflect.String: |
| 234 | if v.Len() != length { |
| 235 | a.fail(t, "unexpected length, expected %d got %d", length, v.Len()) |
| 236 | } |
| 237 | default: |
| 238 | a.fail(t, "Len not supported for kind %s", v.Kind()) |
| 239 | } |
| 240 | } |
no test coverage detected