Subsetf asserts that the list (array, slice, or map) contains all elements given in the subset (array, slice, or map). Map elements are key-value pairs unless compared with an array or slice where only the map key is evaluated. a.Subsetf([1, 2, 3], [1, 2], "error message %s", "formatted") a.Subse
(list interface{}, subset interface{}, msg string, args ...interface{})
| 1625 | // a.Subsetf([1, 2, 3], {1: "one", 2: "two"}, "error message %s", "formatted") |
| 1626 | // a.Subsetf({"x": 1, "y": 2}, ["x"], "error message %s", "formatted") |
| 1627 | func (a *Assertions) Subsetf(list interface{}, subset interface{}, msg string, args ...interface{}) { |
| 1628 | if h, ok := a.t.(tHelper); ok { |
| 1629 | h.Helper() |
| 1630 | } |
| 1631 | Subsetf(a.t, list, subset, msg, args...) |
| 1632 | } |
| 1633 | |
| 1634 | // True asserts that the specified value is true. |
| 1635 | // |