mustFail compares the error strings
(tb testing.TB, err error, want string)
| 65 | |
| 66 | // mustFail compares the error strings |
| 67 | func mustFail(tb testing.TB, err error, want string) { |
| 68 | tb.Helper() |
| 69 | if err == nil { |
| 70 | tb.Errorf("expected an error, but got a nil") |
| 71 | return |
| 72 | } |
| 73 | |
| 74 | if have := err.Error(); have != want { |
| 75 | tb.Errorf("have %q, want %q", have, want) |
| 76 | } |
| 77 | } |
| 78 | |
| 79 | // execute a Do(args[,-1]...), which needs to be the same as the last arg. |
| 80 | func mustDo(tb testing.TB, c *proto.Client, args ...string) { |
no test coverage detected