| 579 | } |
| 580 | |
| 581 | func 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 | |
| 600 | func Test_samePointers(t *testing.T) { |
| 601 | p := ptr(2) |