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

Function Subsetf

internal/testify/assert/assertion_format.go:764–769  ·  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

762// assert.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted")
763// assert.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted")
764func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool {
765 if h, ok := t.(tHelper); ok {
766 h.Helper()
767 }
768 return Subset(t, list, subset, append([]interface{}{msg}, args...)...)
769}
770
771// Truef asserts that the specified value is true.
772//

Callers 2

SubsetfFunction · 0.92
SubsetfMethod · 0.70

Calls 2

SubsetFunction · 0.70
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…