MCPcopy
hub / github.com/expr-lang/expr / ElementsMatchf

Function ElementsMatchf

internal/testify/require/require.go:111–119  ·  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

109//
110// assert.ElementsMatchf(t, [1, 3, 2, 3], [1, 3, 3, 2], "error message %s", "formatted")
111func ElementsMatchf(t TestingT, listA interface{}, listB interface{}, msg string, args ...interface{}) {
112 if h, ok := t.(tHelper); ok {
113 h.Helper()
114 }
115 if assert.ElementsMatchf(t, listA, listB, msg, args...) {
116 return
117 }
118 t.FailNow()
119}
120
121// Empty asserts that the specified object is empty. I.e. nil, "", false, 0 or either
122// a slice or a channel with len == 0.

Callers 1

ElementsMatchfMethod · 0.70

Calls 3

ElementsMatchfFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…