| 629 | } |
| 630 | |
| 631 | func 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 | |
| 650 | func Test_samePointers(t *testing.T) { |
| 651 | p := ptr(2) |