Samef asserts that two pointers reference the same object. a.Samef(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.
(expected interface{}, actual interface{}, msg string, args ...interface{})
| 1498 | // Both arguments must be pointer variables. Pointer variable sameness is |
| 1499 | // determined based on the equality of both type and value. |
| 1500 | func (a *Assertions) Samef(expected interface{}, actual interface{}, msg string, args ...interface{}) bool { |
| 1501 | if h, ok := a.t.(tHelper); ok { |
| 1502 | h.Helper() |
| 1503 | } |
| 1504 | return Samef(a.t, expected, actual, msg, args...) |
| 1505 | } |
| 1506 | |
| 1507 | // Subset asserts that the specified list(array, slice...) or map contains all |
| 1508 | // elements given in the specified subset list(array, slice...) or map. |