execute a Do(args[,-1]...), which needs to be the same as the last arg.
(tb testing.TB, c *proto.Client, args ...string)
| 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) { |
| 81 | tb.Helper() |
| 82 | args, want := args[:len(args)-1], args[len(args)-1] |
| 83 | res, err := c.Do(args...) |
| 84 | if !(proto.IsError(want)) { |
| 85 | ok(tb, err) |
| 86 | } |
| 87 | equals(tb, want, res) |
| 88 | } |
| 89 | |
| 90 | // mustOK is a mustDo() which expects an "OK" response |
| 91 | func mustOK(tb testing.TB, c *proto.Client, args ...string) { |
no test coverage detected