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{})
| 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") |
| 764 | func 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 | // |