AssertError: Don't bother logging nil errors

This commit is contained in:
Jacob Hoffman-Andrews 2015-10-04 21:01:11 -07:00
parent e3e748a192
commit faafc18a20
1 changed files with 1 additions and 1 deletions

View File

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