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

Function const_config_option

plugins/src/options.rs:934–953  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

932
933 #[test]
934 fn const_config_option() {
935 // The main goal of this test is to test compilation
936
937 // Initiate every type as a const
938 const _: FlagConfigOption = ConfigOption::new_flag("flag-option", "A flag option");
939 const _: DefaultBooleanConfigOption =
940 ConfigOption::new_bool_with_default("bool-option", false, "A boolean option");
941 const _: BooleanConfigOption =
942 ConfigOption::new_bool_no_default("bool-option", "A boolean option");
943
944 const _: IntegerConfigOption =
945 ConfigOption::new_i64_no_default("integer-option", "A flag option");
946 const _: DefaultIntegerConfigOption =
947 ConfigOption::new_i64_with_default("integer-option", 12, "A flag option");
948
949 const _: StringConfigOption =
950 ConfigOption::new_str_no_default("integer-option", "A flag option");
951 const _: DefaultStringConfigOption =
952 ConfigOption::new_str_with_default("integer-option", "erik", "A flag option");
953 }
954
955 #[test]
956 fn test_type_serialize() {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected