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

Function stest

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

Source from the content-addressed store, hash-verified

207};
208
209static void stest(const struct json *j, struct sanity *b)
210{
211 u64 *ival;
212 u64 *fpval;
213 if (!param(cmd, j->buffer, j->toks,
214 p_req("u64", param_u64, &ival),
215 p_req("fp", param_millionths, &fpval), NULL)) {
216 assert(check_fail());
217 assert(b->failed == true);
218 if (!strstr(fail_msg, b->fail_str)) {
219 printf("%s != %s\n", fail_msg, b->fail_str);
220 assert(false);
221 }
222 } else {
223 assert(!check_fail());
224 assert(b->failed == false);
225 assert(*ival == 42);
226 assert(*fpval > 3149900 && b->fpval < 3150100);
227 }
228}
229
230static void sanity(void)
231{

Callers 1

sanityFunction · 0.85

Calls 2

check_failFunction · 0.85
paramClass · 0.70

Tested by

no test coverage detected