MCPcopy Create free account
hub / github.com/CPChain/chain / checkError

Function checkError

types/log_test.go:118–132  ·  view source on GitHub ↗
(t *testing.T, testname string, got, want error)

Source from the content-addressed store, hash-verified

116}
117
118func checkError(t *testing.T, testname string, got, want error) bool {
119 if got == nil {
120 if want != nil {
121 t.Errorf("test %q: got no error, want %q", testname, want)
122 return false
123 }
124 return true
125 }
126 if want == nil {
127 t.Errorf("test %q: unexpected error %q", testname, got)
128 } else if got.Error() != want.Error() {
129 t.Errorf("test %q: got error %q, want %q", testname, got, want)
130 }
131 return false
132}

Callers 1

TestUnmarshalLogFunction · 0.70

Calls 1

ErrorMethod · 0.65

Tested by

no test coverage detected