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

Method TestError

internal/grpctest/tlogger_test.go:67–79  ·  view source on GitHub ↗
(*testing.T)

Source from the content-addressed store, hash-verified

65}
66
67func (s) TestError(*testing.T) {
68 const numErrors = 10
69 ExpectError("Expected error")
70 ExpectError("Expected ln error")
71 ExpectError("Expected formatted error")
72 ExpectErrorN("Expected repeated error", numErrors)
73 grpclog.Error("Expected", "error")
74 grpclog.Errorln("Expected", "ln", "error")
75 grpclog.Errorf("%v %v %v", "Expected", "formatted", "error")
76 for i := 0; i < numErrors; i++ {
77 grpclog.Error("Expected repeated error")
78 }
79}

Callers

nothing calls this directly

Calls 5

ErrorFunction · 0.92
ErrorlnFunction · 0.92
ErrorfFunction · 0.92
ExpectErrorFunction · 0.85
ExpectErrorNFunction · 0.85

Tested by

no test coverage detected