* Verify consistent internal state. */
| 243 | * Verify consistent internal state. |
| 244 | */ |
| 245 | static void check_params(const struct param *params) |
| 246 | { |
| 247 | if (tal_count(params) < 2) |
| 248 | return; |
| 249 | |
| 250 | /* make sure there are no required params following optional */ |
| 251 | check_distinct(params, comp_req_order); |
| 252 | |
| 253 | /* duplicate so we can sort */ |
| 254 | struct param *copy = tal_dup_talarr(params, struct param, params); |
| 255 | |
| 256 | /* check for repeated names and args */ |
| 257 | check_unique(copy, comp_by_name); |
| 258 | |
| 259 | tal_free(copy); |
| 260 | } |
| 261 | |
| 262 | static char *param_usage(const tal_t *ctx, |
| 263 | const struct param *params) |
no test coverage detected