| 653 | } |
| 654 | |
| 655 | func TestNotSame(t *testing.T) { |
| 656 | t.Parallel() |
| 657 | |
| 658 | mockT := new(testing.T) |
| 659 | |
| 660 | if !NotSame(mockT, ptr(1), ptr(1)) { |
| 661 | t.Error("NotSame should return true; different pointers") |
| 662 | } |
| 663 | if !NotSame(mockT, 1, 1) { |
| 664 | t.Error("NotSame should return true; constant inputs") |
| 665 | } |
| 666 | p := ptr(2) |
| 667 | if !NotSame(mockT, p, *p) { |
| 668 | t.Error("NotSame should return true; mixed-type inputs") |
| 669 | } |
| 670 | if NotSame(mockT, p, p) { |
| 671 | t.Error("NotSame should return false") |
| 672 | } |
| 673 | } |
| 674 | |
| 675 | func Test_samePointers(t *testing.T) { |
| 676 | t.Parallel() |