add actual error message to test.AssertError

This commit is contained in:
Jeff Hodges 2015-09-01 15:08:48 -07:00
parent fe00decc92
commit 03cb25c601
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@ func AssertNotNil(t *testing.T, obj interface{}, message string) {
// AssertNotError checks that err is nil
func AssertNotError(t *testing.T, err error, message string) {
if err != nil {
t.Fatalf("%s %s", caller(), message)
t.Fatalf("%s %s: %s", caller(), message, err)
}
}