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{})
| 788 | // assert.Subsetf(t, [1, 2, 3], [1, 2], "error message %s", "formatted") |
| 789 | // assert.Subsetf(t, {"x": 1, "y": 2}, {"x": 1}, "error message %s", "formatted") |
| 790 | func Subsetf(t TestingT, list interface{}, subset interface{}, msg string, args ...interface{}) bool { |
| 791 | if h, ok := t.(tHelper); ok { |
| 792 | h.Helper() |
| 793 | } |
| 794 | return Subset(t, list, subset, append([]interface{}{msg}, args...)...) |
| 795 | } |
| 796 | |
| 797 | // Truef asserts that the specified value is true. |
| 798 | // |