NotSubset asserts that the list (array, slice, or map) does NOT contain 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. require.NotSubset(t, [1, 3, 4], [1, 2]) require.NotSubset(t
(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{})
| 1797 | // require.NotSubset(t, [1, 3, 4], {1: "one", 2: "two"}) |
| 1798 | // require.NotSubset(t, {"x": 1, "y": 2}, ["z"]) |
| 1799 | func NotSubset(t TestingT, list interface{}, subset interface{}, msgAndArgs ...interface{}) { |
| 1800 | if h, ok := t.(tHelper); ok { |
| 1801 | h.Helper() |
| 1802 | } |
| 1803 | if assert.NotSubset(t, list, subset, msgAndArgs...) { |
| 1804 | return |
| 1805 | } |
| 1806 | t.FailNow() |
| 1807 | } |
| 1808 | |
| 1809 | // NotSubsetf asserts that the list (array, slice, or map) does NOT contain all |
| 1810 | // elements given in the subset (array, slice, or map). |