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

Method Subset

require/require_forward.go:1611–1616  ·  view source on GitHub ↗

Subset 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.Subset([1, 2, 3], [1, 2]) a.Subset({"x": 1, "y": 2}, {"x": 1}) a.Su

(list interface{}, subset interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

1609// a.Subset([1, 2, 3], {1: "one", 2: "two"})
1610// a.Subset({"x": 1, "y": 2}, ["x"])
1611func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) {
1612 if h, ok := a.t.(tHelper); ok {
1613 h.Helper()
1614 }
1615 Subset(a.t, list, subset, msgAndArgs...)
1616}
1617
1618// Subsetf asserts that the list (array, slice, or map) contains all elements
1619// given in the subset (array, slice, or map).

Callers

nothing calls this directly

Calls 2

SubsetFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected