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

Method Subsetf

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

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

Callers

nothing calls this directly

Calls 2

SubsetfFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected