AssertError: Don't bother logging nil errors
This commit is contained in:
parent
e3e748a192
commit
faafc18a20
|
|
@ -50,7 +50,7 @@ func AssertNotError(t *testing.T, err error, message string) {
|
||||||
// AssertError checks that err is non-nil
|
// AssertError checks that err is non-nil
|
||||||
func AssertError(t *testing.T, err error, message string) {
|
func AssertError(t *testing.T, err error, message string) {
|
||||||
if err == nil {
|
if err == nil {
|
||||||
t.Fatalf("%s %s: %s", caller(), message, err)
|
t.Fatalf("%s %s", caller(), message)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue