MCPcopy Create free account
hub / github.com/ElementsProject/lightning / stest

Function stest

common/test/run-param.c:165–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

163};
164
165static void stest(const struct json *j, struct sanity *b)
166{
167 u64 *ival;
168 u64 *fpval;
169 if (!param(cmd, j->buffer, j->toks,
170 p_req("u64", param_u64, &ival),
171 p_req("fp", param_millionths, &fpval), NULL)) {
172 assert(check_fail());
173 assert(b->failed == true);
174 if (!strstr(fail_msg, b->fail_str)) {
175 printf("%s != %s\n", fail_msg, b->fail_str);
176 assert(false);
177 }
178 } else {
179 assert(!check_fail());
180 assert(b->failed == false);
181 assert(*ival == 42);
182 assert(*fpval > 3149900 && b->fpval < 3150100);
183 }
184}
185
186static void sanity(void)
187{

Callers 1

sanityFunction · 0.85

Calls 2

check_failFunction · 0.85
paramClass · 0.70

Tested by

no test coverage detected