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

Function param_tests

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

Source from the content-addressed store, hash-verified

620}
621
622static void param_tests(void)
623{
624 test_cb(param_bool, bool, "[ true ]", true, true);
625 test_cb(param_bool, bool, "[ false ]", false, true);
626 test_cb(param_bool, bool, "[ tru ]", false, false);
627 test_cb(param_bool, bool, "[ 1 ]", false, false);
628
629 test_cb(param_millionths, u64, "[ -0.01 ]", 0, false);
630 test_cb(param_millionths, u64, "[ 0.00 ]", 0, true);
631 test_cb(param_millionths, u64, "[ 1 ]", 1000000, true);
632 test_cb(param_millionths, u64, "[ 1.1 ]", 1100000, true);
633 test_cb(param_millionths, u64, "[ 1.01 ]", 1010000, true);
634 test_cb(param_millionths, u64, "[ 99.99 ]", 99990000, true);
635 test_cb(param_millionths, u64, "[ 100.0 ]", 100000000, true);
636 test_cb(param_millionths, u64, "[ 100.001 ]", 100001000, true);
637 test_cb(param_millionths, u64, "[ 1000 ]", 1000000000, true);
638 test_cb(param_millionths, u64, "[ 'wow' ]", 0, false);
639}
640
641static void test_invoice(struct command *cmd,
642 const char *buffer,

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected