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

Method ElementsMatch

require/require_forward.go:77–82  ·  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

75//
76// a.ElementsMatch([1, 3, 2, 3], [1, 3, 3, 2])
77func (a *Assertions) ElementsMatch(listA interface{}, listB interface{}, msgAndArgs ...interface{}) {
78 if h, ok := a.t.(tHelper); ok {
79 h.Helper()
80 }
81 ElementsMatch(a.t, listA, listB, msgAndArgs...)
82}
83
84// ElementsMatchf asserts that the specified listA(array, slice...) is equal to specified
85// 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