(t *testing.T, testname string, got, want error)
| 116 | } |
| 117 | |
| 118 | func 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 | } |
no test coverage detected