mirror of https://github.com/stretchr/testify.git
Add formatUnequalValues struct test coverage
This expands the TestFormatUnequalValues test case to cover the behavior of the function when provided two struct type'd values.pull/327/head
parent
a34cbb254a
commit
d2b5f58808
|
@ -207,6 +207,14 @@ func TestFormatUnequalValues(t *testing.T) {
|
|||
expected, actual = formatUnequalValues(int64(123), int32(123))
|
||||
Equal(t, `int64(123)`, expected, "value should include type")
|
||||
Equal(t, `int32(123)`, actual, "value should include type")
|
||||
|
||||
type testStructType struct {
|
||||
Val string
|
||||
}
|
||||
|
||||
expected, actual = formatUnequalValues(&testStructType{Val: "test"}, &testStructType{Val: "test"})
|
||||
Equal(t, `&assert.testStructType{Val:"test"}`, expected, "value should not include type annotation")
|
||||
Equal(t, `&assert.testStructType{Val:"test"}`, actual, "value should not include type annotation")
|
||||
}
|
||||
|
||||
func TestNotNil(t *testing.T) {
|
||||
|
|
Loading…
Reference in New Issue