MCPcopy Create free account
hub / github.com/expr-lang/expr / Subset

Method Subset

internal/testify/require/require_forward.go:1514–1519  ·  view source on GitHub ↗

Subset asserts that the specified list(array, slice...) or map contains all elements given in the specified subset list(array, slice...) or map. a.Subset([1, 2, 3], [1, 2]) a.Subset({"x": 1, "y": 2}, {"x": 1})

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

Source from the content-addressed store, hash-verified

1512// a.Subset([1, 2, 3], [1, 2])
1513// a.Subset({"x": 1, "y": 2}, {"x": 1})
1514func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) {
1515 if h, ok := a.t.(tHelper); ok {
1516 h.Helper()
1517 }
1518 Subset(a.t, list, subset, msgAndArgs...)
1519}
1520
1521// Subsetf asserts that the specified list(array, slice...) or map contains all
1522// elements given in the specified subset list(array, slice...) or map.

Callers

nothing calls this directly

Calls 2

SubsetFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected