(t *testing.T)
| 33 | } |
| 34 | |
| 35 | func TestMinimumNs_with_error(t *testing.T) { |
| 36 | tests := []struct { |
| 37 | N int |
| 38 | CustomMessage string |
| 39 | WantMessage string |
| 40 | }{ |
| 41 | { |
| 42 | N: 1, |
| 43 | CustomMessage: "A custom msg", |
| 44 | WantMessage: "A custom msg", |
| 45 | }, |
| 46 | { |
| 47 | N: 1, |
| 48 | CustomMessage: "", |
| 49 | WantMessage: "requires at least 1 arg(s), only received 0", |
| 50 | }, |
| 51 | } |
| 52 | |
| 53 | for _, test := range tests { |
| 54 | if got := MinimumArgs(test.N, test.CustomMessage)(nil, nil); got.Error() != test.WantMessage { |
| 55 | t.Errorf("Got: %v, Want: %v", got, test.WantMessage) |
| 56 | } |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | func TestPartition(t *testing.T) { |
| 61 | tests := []struct { |
nothing calls this directly
no test coverage detected