isList checks that the provided value is array or slice.
(t TestingT, list interface{}, msgAndArgs ...interface{})
| 1159 | |
| 1160 | // isList checks that the provided value is array or slice. |
| 1161 | func isList(t TestingT, list interface{}, msgAndArgs ...interface{}) (ok bool) { |
| 1162 | kind := reflect.TypeOf(list).Kind() |
| 1163 | if kind != reflect.Array && kind != reflect.Slice { |
| 1164 | return Fail(t, fmt.Sprintf("%q has an unsupported type %s, expecting array or slice", list, kind), |
| 1165 | msgAndArgs...) |
| 1166 | } |
| 1167 | return true |
| 1168 | } |
| 1169 | |
| 1170 | // diffLists diffs two arrays/slices and returns slices of elements that are only in A and only in B. |
| 1171 | // If some element is present multiple times, each instance is counted separately (e.g. if something is 2x in A and |
no test coverage detected