Error asserts that the given err is not nil.
(t *testing.T, err error)
| 127 | |
| 128 | // Error asserts that the given err is not nil. |
| 129 | func Error(t *testing.T, err error) bool { |
| 130 | t.Helper() |
| 131 | |
| 132 | if err == nil { |
| 133 | errorf(t, "an error", err) |
| 134 | return false |
| 135 | } |
| 136 | |
| 137 | return true |
| 138 | } |
| 139 | |
| 140 | // MustError requires that the given err is not nil. |
| 141 | func MustError(t *testing.T, err error) { |