MCPcopy Index your code
hub / github.com/expr-lang/expr / Subsetf

Function Subsetf

internal/testify/require/require.go:1931–1939  ·  view source on GitHub ↗

Subsetf asserts that the specified list(array, slice...) or map contains all elements given in the specified subset list(array, slice...) or map. assert.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted") assert.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted")

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

Source from the content-addressed store, hash-verified

1929// assert.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted")
1930// assert.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted")
1931func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) {
1932 if h, ok := t.(tHelper); ok {
1933 h.Helper()
1934 }
1935 if assert.Subsetf(t, list, subset, msg, args...) {
1936 return
1937 }
1938 t.FailNow()
1939}
1940
1941// True asserts that the specified value is true.
1942//

Callers 1

SubsetfMethod · 0.70

Calls 3

SubsetfFunction · 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…