(t *testing.T)
| 718 | } |
| 719 | |
| 720 | func TestFormatUnequalValues(t *testing.T) { |
| 721 | expected, actual := formatUnequalValues("foo", "bar") |
| 722 | Equal(t, `"foo"`, expected, "value should not include type") |
| 723 | Equal(t, `"bar"`, actual, "value should not include type") |
| 724 | |
| 725 | expected, actual = formatUnequalValues(123, 123) |
| 726 | Equal(t, `123`, expected, "value should not include type") |
| 727 | Equal(t, `123`, actual, "value should not include type") |
| 728 | |
| 729 | expected, actual = formatUnequalValues(int64(123), int32(123)) |
| 730 | Equal(t, `int64(123)`, expected, "value should include type") |
| 731 | Equal(t, `int32(123)`, actual, "value should include type") |
| 732 | |
| 733 | expected, actual = formatUnequalValues(int64(123), nil) |
| 734 | Equal(t, `int64(123)`, expected, "value should include type") |
| 735 | Equal(t, `<nil>(<nil>)`, actual, "value should include type") |
| 736 | |
| 737 | type testStructType struct { |
| 738 | Val string |
| 739 | } |
| 740 | |
| 741 | expected, actual = formatUnequalValues(&testStructType{Val: "test"}, &testStructType{Val: "test"}) |
| 742 | Equal(t, `&assert.testStructType{Val:"test"}`, expected, "value should not include type annotation") |
| 743 | Equal(t, `&assert.testStructType{Val:"test"}`, actual, "value should not include type annotation") |
| 744 | } |
| 745 | |
| 746 | func TestNotNil(t *testing.T) { |
| 747 |
nothing calls this directly
no test coverage detected
searching dependent graphs…