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

Function TestNotSame

internal/testify/assert/assertions_test.go:581–598  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

579}
580
581func TestNotSame(t *testing.T) {
582
583 mockT := new(testing.T)
584
585 if !NotSame(mockT, ptr(1), ptr(1)) {
586 t.Error("NotSame should return true; different pointers")
587 }
588 if !NotSame(mockT, 1, 1) {
589 t.Error("NotSame should return true; constant inputs")
590 }
591 p := ptr(2)
592 if !NotSame(mockT, p, *p) {
593 t.Error("NotSame should return true; mixed-type inputs")
594 }
595 if NotSame(mockT, p, p) {
596 t.Error("NotSame should return false")
597 }
598}
599
600func Test_samePointers(t *testing.T) {
601 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

Used in the wild real call sites across dependent graphs

searching dependent graphs…