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

Function TestSame

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

Source from the content-addressed store, hash-verified

560}
561
562func TestSame(t *testing.T) {
563
564 mockT := new(testing.T)
565
566 if Same(mockT, ptr(1), ptr(1)) {
567 t.Error("Same should return false")
568 }
569 if Same(mockT, 1, 1) {
570 t.Error("Same should return false")
571 }
572 p := ptr(2)
573 if Same(mockT, p, *p) {
574 t.Error("Same should return false")
575 }
576 if !Same(mockT, p, p) {
577 t.Error("Same should return true")
578 }
579}
580
581func TestNotSame(t *testing.T) {
582

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…