MCPcopy Create free account
hub / github.com/expr-lang/expr / Samef

Function Samef

internal/testify/require/require.go:1901–1909  ·  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

1899// Both arguments must be pointer variables. Pointer variable sameness is
1900// determined based on the equality of both type and value.
1901func Samef(t TestingT, expected interface{}, actual interface{}, msg string, args ...interface{}) {
1902 if h, ok := t.(tHelper); ok {
1903 h.Helper()
1904 }
1905 if assert.Samef(t, expected, actual, msg, args...) {
1906 return
1907 }
1908 t.FailNow()
1909}
1910
1911// Subset asserts that the specified list(array, slice...) or map contains all
1912// elements given in the specified subset list(array, slice...) or map.

Callers 1

SamefMethod · 0.70

Calls 3

SamefFunction · 0.92
FailNowMethod · 0.65
HelperMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…