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

Function NotSame

internal/testify/assert/assertions.go:518–529  ·  view source on GitHub ↗

NotSame asserts that two pointers do not reference the same object. assert.NotSame(t, ptr1, ptr2) Both arguments must be pointer variables. Pointer variable sameness is determined based on the equality of both type and value.

(t TestingT, expected, actual interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

516// Both arguments must be pointer variables. Pointer variable sameness is
517// determined based on the equality of both type and value.
518func NotSame(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {
519 if h, ok := t.(tHelper); ok {
520 h.Helper()
521 }
522
523 if samePointers(expected, actual) {
524 return Fail(t, fmt.Sprintf(
525 "Expected and actual point to the same object: %p %#v",
526 expected, expected), msgAndArgs...)
527 }
528 return true
529}
530
531// samePointers compares two generic interface objects and returns whether
532// they point to the same object

Callers 4

NotSameFunction · 0.92
NotSamefFunction · 0.70
TestNotSameFunction · 0.70
NotSameMethod · 0.70

Calls 4

samePointersFunction · 0.85
SprintfMethod · 0.80
FailFunction · 0.70
HelperMethod · 0.45

Tested by 1

TestNotSameFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…