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

Function TestNotSame

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

Source from the content-addressed store, hash-verified

629}
630
631func TestNotSame(t *testing.T) {
632
633 mockT := new(testing.T)
634
635 if !NotSame(mockT, ptr(1), ptr(1)) {
636 t.Error("NotSame should return true; different pointers")
637 }
638 if !NotSame(mockT, 1, 1) {
639 t.Error("NotSame should return true; constant inputs")
640 }
641 p := ptr(2)
642 if !NotSame(mockT, p, *p) {
643 t.Error("NotSame should return true; mixed-type inputs")
644 }
645 if NotSame(mockT, p, p) {
646 t.Error("NotSame should return false")
647 }
648}
649
650func Test_samePointers(t *testing.T) {
651 p := ptr(2)

Callers

nothing calls this directly

Calls 3

ptrFunction · 0.85
NotSameFunction · 0.70
ErrorMethod · 0.45

Tested by

no test coverage detected