Display actual and expected values on NotEqual

pull/206/head
Siva Gollapalli 2015-08-26 19:31:23 +05:30
parent efea42fa21
commit 80b247df3c
1 changed files with 2 additions and 1 deletions

View File

@ -492,7 +492,8 @@ func False(t TestingT, value bool, msgAndArgs ...interface{}) bool {
func NotEqual(t TestingT, expected, actual interface{}, msgAndArgs ...interface{}) bool {
if ObjectsAreEqual(expected, actual) {
return Fail(t, "Should not be equal", msgAndArgs...)
return Fail(t, fmt.Sprintf("Not Equal: %#v (expected)\n"+
" != %#v (actual)", actual, expected), msgAndArgs...)
}
return true