Samef asserts that two pointers reference the same object. assert.Samef(t, ptr1, ptr2, "error message %s", "formatted") Both arguments must be pointer variables. Pointer variable sameness is determined based on the equality of both type and value.
(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{})
| 750 | // Both arguments must be pointer variables. Pointer variable sameness is |
| 751 | // determined based on the equality of both type and value. |
| 752 | func Samef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { |
| 753 | if h, ok := t.(tHelper); ok { |
| 754 | h.Helper() |
| 755 | } |
| 756 | return Same(t, expected, actual, append([]interface{}{msg}, args...)...) |
| 757 | } |
| 758 | |
| 759 | // Subsetf asserts that the specified list(array, slice...) or map contains all |
| 760 | // elements given in the specified subset list(array, slice...) or map. |