Subset 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.Subset([1, 2, 3], [1, 2]) a.Subset({"x": 1, "y": 2}, {"x": 1}) a.Su
(list interface{}, subset interface{}, msgAndArgs ...interface{})
| 1608 | // a.Subset([1, 2, 3], {1: "one", 2: "two"}) |
| 1609 | // a.Subset({"x": 1, "y": 2}, ["x"]) |
| 1610 | func (a *Assertions) Subset(list interface{}, subset interface{}, msgAndArgs ...interface{}) bool { |
| 1611 | if h, ok := a.t.(tHelper); ok { |
| 1612 | h.Helper() |
| 1613 | } |
| 1614 | return Subset(a.t, list, subset, msgAndArgs...) |
| 1615 | } |
| 1616 | |
| 1617 | // Subsetf asserts that the list (array, slice, or map) contains all elements |
| 1618 | // given in the subset (array, slice, or map). |