MCPcopy Create free account
hub / github.com/assembla/cony / TestClient_reportErr

Function TestClient_reportErr

client_test.go:102–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

100}
101
102func TestClient_reportErr(t *testing.T) {
103 c := NewClient()
104
105 if c.reportErr(nil) {
106 t.Error("should return false on no error")
107 }
108
109 // fill in errs buffer
110 for i := 0; i < 100; i++ {
111 c.reportErr(errors.New("test err"))
112 }
113
114 // should not block, error will be discarded
115 if !c.reportErr(errors.New("test err")) {
116 t.Error("should return true")
117 }
118}
119
120func TestClient_channel(t *testing.T) {}
121

Callers

nothing calls this directly

Calls 2

reportErrMethod · 0.95
NewClientFunction · 0.85

Tested by

no test coverage detected