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

Function ElementsMatchf

assert/assertion_format.go:46–51  ·  view source on GitHub ↗

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

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

Source from the content-addressed store, hash-verified

44//
45// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted")
46func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) bool {
47 if h, ok := t.(tHelper); ok {
48 h.Helper()
49 }
50 return ElementsMatch(t, listA, listB, append([]interface{}{msg}, args...)...)
51}
52
53// Emptyf asserts that the given value is "empty".
54//

Callers 2

ElementsMatchfFunction · 0.92
ElementsMatchfMethod · 0.70

Calls 2

ElementsMatchFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected