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

Function ElementsMatchf

require/require.go:110–118  ·  require/require.go::ElementsMatchf

ElementsMatchf 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.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3,

(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

108//
109// require.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted")
110func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) {
111 if h, ok := t.(tHelper); ok {
112 h.Helper()
113 }
114 if assert.ElementsMatchf(t, listA, listB, msg, args...) {
115 return
116 }
117 t.FailNow()
118}
119
120// Empty asserts that the given value is "empty".
121//

Callers 1

ElementsMatchfMethod · 0.70

Calls 3

ElementsMatchfFunction · 0.92
HelperMethod · 0.65
FailNowMethod · 0.65

Tested by

no test coverage detected