ElementsMatch asserts that the specified listA(array, slice...) is equal to specified listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, the number of appearances of each of them in both lists should match. require.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]
(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{})
| 93 | // |
| 94 | // require.ElementsMatch(t, [1, 3, 2, 3], [1, 3, 3, 2]) |
| 95 | func ElementsMatch(t TestingT, listA interface{}, listB interface{}, msgAndArgs ...interface{}) { |
| 96 | if h, ok := t.(tHelper); ok { |
| 97 | h.Helper() |
| 98 | } |
| 99 | if assert.ElementsMatch(t, listA, listB, msgAndArgs...) { |
| 100 | return |
| 101 | } |
| 102 | t.FailNow() |
| 103 | } |
| 104 | |
| 105 | // ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified |
| 106 | // listB(array, slice...) ignoring the order of the elements. If there are duplicate elements, |
no test coverage detected