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

Function Subset

internal/testify/require/require.go:1916–1924  ·  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. assert.Subset(t, [1, 2, 3], [1, 2]) assert.Subset(t, {"x": 1, "y": 2}, {"x": 1})

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

Source from the content-addressed store, hash-verified

1914// assert.Subset(t, [1, 2, 3], [1, 2])
1915// assert.Subset(t, {"x": 1, "y": 2}, {"x": 1})
1916func Subset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) {
1917 if h, ok := t.(tHelper); ok {
1918 h.Helper()
1919 }
1920 if assert.Subset(t, list, subset, msgAndArgs...) {
1921 return
1922 }
1923 t.FailNow()
1924}
1925
1926// Subsetf asserts that the specified list(array, slice...) or map contains all
1927// elements given in the specified subset list(array, slice...) or map.

Callers 1

SubsetMethod · 0.70

Calls 3

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