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

Function TestSame

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

Source from the content-addressed store, hash-verified

633}
634
635func TestSame(t *testing.T) {
636 t.Parallel()
637
638 mockT := new(testing.T)
639
640 if Same(mockT, ptr(1), ptr(1)) {
641 t.Error("Same should return false")
642 }
643 if Same(mockT, 1, 1) {
644 t.Error("Same should return false")
645 }
646 p := ptr(2)
647 if Same(mockT, p, *p) {
648 t.Error("Same should return false")
649 }
650 if !Same(mockT, p, p) {
651 t.Error("Same should return true")
652 }
653}
654
655func TestNotSame(t *testing.T) {
656 t.Parallel()

Callers

nothing calls this directly

Calls 3

ptrFunction · 0.85
SameFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…