MCPcopy
hub / github.com/grpc/grpc-go / ExpectError

Function ExpectError

internal/grpctest/tlogger.go:176–178  ·  internal/grpctest/tlogger.go::ExpectError

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)

Source from the content-addressed store, hash-verified

174// Update(). Note that if an expected error is not encountered, this will cause
175// the test to fail.
176func ExpectError(expr string) {
177 expectLogsN(expr, 1, errorLog)
178}
179
180// ExpectErrorN declares an error to be expected n times.
181func ExpectErrorN(expr string, n int) {

Calls 1

expectLogsNFunction · 0.85