MCPcopy
hub / github.com/stretchr/testify / TestNotSame

Function TestNotSame

assert/assertions_test.go:655–673  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

653}
654
655func TestNotSame(t *testing.T) {
656 t.Parallel()
657
658 mockT := new(testing.T)
659
660 if !NotSame(mockT, ptr(1), ptr(1)) {
661 t.Error("NotSame should return true; different pointers")
662 }
663 if !NotSame(mockT, 1, 1) {
664 t.Error("NotSame should return true; constant inputs")
665 }
666 p := ptr(2)
667 if !NotSame(mockT, p, *p) {
668 t.Error("NotSame should return true; mixed-type inputs")
669 }
670 if NotSame(mockT, p, p) {
671 t.Error("NotSame should return false")
672 }
673}
674
675func Test_samePointers(t *testing.T) {
676 t.Parallel()

Callers

nothing calls this directly

Calls 3

ptrFunction · 0.85
NotSameFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…