MCPcopy Create free account
hub / github.com/stretchr/testify / Samef

Function Samef

assert/assertion_format.go:778–783  ·  view source on GitHub ↗

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{})

Source from the content-addressed store, hash-verified

776// Both arguments must be pointer variables. Pointer variable sameness is
777// determined based on the equality of both type and value.
778func 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.

Callers 2

SamefFunction · 0.92
SamefMethod · 0.70

Calls 2

SameFunction · 0.70
HelperMethod · 0.65

Tested by

no test coverage detected