MCPcopy
hub / github.com/stretchr/testify / ElementsMatch

Method ElementsMatch

assert/assertion_forward.go:76–81  ·  view source on GitHub ↗

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. a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2])

(listA interface{}, listB interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

74//
75// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2])
76func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) bool {
77 if h, ok := a.t.(tHelper); ok {
78 h.Helper()
79 }
80 return ElementsMatch(a.t, listA, listB, msgAndArgs...)
81}
82
83// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified
84// listB(array, slice...) ignoring the order of the elements. If there are duplicate elements,

Callers

nothing calls this directly

Calls 2

ElementsMatchFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected