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