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

Method Subsetf

assert/assertion_forward.go:1626–1631  ·  view source on GitHub ↗

Subsetf asserts that the list (array, slice, or map) contains all elements given in the subset (array, slice, or map). Map elements are key-value pairs unless compared with an array or slice where only the map key is evaluated. a.Subsetf([1, 2, 3], [1, 2], "error message %s", "formatted") a.Subse

(list interface{}, subset interface{}, msg string, args ...interface{})

Source from the content-addressed store, hash-verified

1624// a.Subsetf([1, 2, 3], {1: "one", 2: "two"}, "error message %s", "formatted")
1625// a.Subsetf({"x": 1, "y": 2}, ["x"], "error message %s", "formatted")
1626func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) bool {
1627 if h, ok := a.t.(tHelper); ok {
1628 h.Helper()
1629 }
1630 return Subsetf(a.t, list, subset, msg, args...)
1631}
1632
1633// True asserts that the specified value is true.
1634//

Callers

nothing calls this directly

Calls 2

SubsetfFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected