(t *testing.T)
| 788 | } |
| 789 | |
| 790 | func TestFormatUnequalValues(t *testing.T) { |
| 791 | expected, actual := formatUnequalValues("foo", "bar") |
| 792 | Equal(t, `"foo"`, expected, "value should not include type") |
| 793 | Equal(t, `"bar"`, actual, "value should not include type") |
| 794 | |
| 795 | expected, actual = formatUnequalValues(123, 123) |
| 796 | Equal(t, `123`, expected, "value should not include type") |
| 797 | Equal(t, `123`, actual, "value should not include type") |
| 798 | |
| 799 | expected, actual = formatUnequalValues(int64(123), int32(123)) |
| 800 | Equal(t, `int64(123)`, expected, "value should include type") |
| 801 | Equal(t, `int32(123)`, actual, "value should include type") |
| 802 | |
| 803 | expected, actual = formatUnequalValues(int64(123), nil) |
| 804 | Equal(t, `int64(123)`, expected, "value should include type") |
| 805 | Equal(t, `<nil>(<nil>)`, actual, "value should include type") |
| 806 | |
| 807 | type testStructType struct { |
| 808 | Val string |
| 809 | } |
| 810 | |
| 811 | expected, actual = formatUnequalValues(&testStructType{Val: "test"}, &testStructType{Val: "test"}) |
| 812 | Equal(t, `&assert.testStructType{Val:"test"}`, expected, "value should not include type annotation") |
| 813 | Equal(t, `&assert.testStructType{Val:"test"}`, actual, "value should not include type annotation") |
| 814 | } |
| 815 | |
| 816 | func TestNotNil(t *testing.T) { |
| 817 |
nothing calls this directly
no test coverage detected