programer -> developer

Signed-off-by: Mark Beckwith <wythe@intrig.com>
This commit is contained in:
Mark Beckwith 2018-07-28 12:59:06 -05:00 committed by Christian Decker
parent 428da65fb1
commit 1851ebbc56
2 changed files with 8 additions and 8 deletions

View File

@ -284,7 +284,7 @@ static bool param_arr(struct command *cmd, const char *buffer,
{
#if DEVELOPER
if (!check_params(params)) {
command_fail(cmd, PARAM_DEV_ERROR, "programmer error");
command_fail(cmd, PARAM_DEV_ERROR, "developer error");
return false;
}
#endif
@ -312,7 +312,7 @@ bool param(struct command *cmd, const char *buffer,
void *arg = va_arg(ap, void *);
size_t argsize = va_arg(ap, size_t);
if (!param_add(&params, name, required, cb, arg, argsize)) {
command_fail(cmd, PARAM_DEV_ERROR, "programmer error");
command_fail(cmd, PARAM_DEV_ERROR, "developer error");
va_end(ap);
return false;
}

View File

@ -268,33 +268,33 @@ static void bad_programmer(void)
p_req("double", json_tok_double, &dval),
p_req("repeat", json_tok_u64, &ival2), NULL));
assert(check_fail());
assert(strstr(fail_msg, "programmer error"));
assert(strstr(fail_msg, "developer error"));
assert(!param(cmd, j->buffer, j->toks,
p_req("repeat", json_tok_u64, &ival),
p_req("double", json_tok_double, &dval),
p_req("repeat", json_tok_u64, &ival), NULL));
assert(check_fail());
assert(strstr(fail_msg, "programmer error"));
assert(strstr(fail_msg, "developer error"));
assert(!param(cmd, j->buffer, j->toks,
p_req("u64", json_tok_u64, &ival),
p_req("repeat", json_tok_double, &dval),
p_req("repeat", json_tok_double, &dval), NULL));
assert(check_fail());
assert(strstr(fail_msg, "programmer error"));
assert(strstr(fail_msg, "developer error"));
/* check for repeated arguments */
assert(!param(cmd, j->buffer, j->toks,
p_req("u64", json_tok_u64, &ival),
p_req("repeated-arg", json_tok_u64, &ival), NULL));
assert(check_fail());
assert(strstr(fail_msg, "programmer error"));
assert(strstr(fail_msg, "developer error"));
assert(!param(cmd, j->buffer, j->toks,
p_req("u64", (param_cb) NULL, &ival), NULL));
assert(check_fail());
assert(strstr(fail_msg, "programmer error"));
assert(strstr(fail_msg, "developer error"));
/* Add required param after optional */
j = json_parse(cmd, "[ '25', '546', '26', '1.1' ]");
@ -306,7 +306,7 @@ static void bad_programmer(void)
p_opt_def("msatoshi", json_tok_number, &msatoshi, 100),
p_req("riskfactor", json_tok_double, &riskfactor), NULL));
assert(check_fail());
assert(strstr(fail_msg, "programmer error"));
assert(strstr(fail_msg, "developer error"));
}
#endif