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{})
| 776 | // Both arguments must be pointer variables. Pointer variable sameness is |
| 777 | // determined based on the equality of both type and value. |
| 778 | func Samef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) bool { |
| 779 | if h, ok := t.(tHelper); ok { |
| 780 | h.Helper() |
| 781 | } |
| 782 | return Same(t, expected, actual, append([]interface{}{msg}, args...)...) |
| 783 | } |
| 784 | |
| 785 | // Subsetf asserts that the specified list(array, slice...) or map contains all |
| 786 | // elements given in the specified subset list(array, slice...) or map. |