ExpectError declares an error to be expected. For the next test, the first error log matching the expression (using FindString) will not cause the test to fail. "For the next test" includes all the time until the next call to Update(). Note that if an expected error is not encountered, this will cau
(expr string)
| 174 | // Update(). Note that if an expected error is not encountered, this will cause |
| 175 | // the test to fail. |
| 176 | func ExpectError(expr string) { |
| 177 | expectLogsN(expr, 1, errorLog) |
| 178 | } |
| 179 | |
| 180 | // ExpectErrorN declares an error to be expected n times. |
| 181 | func ExpectErrorN(expr string, n int) { |