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

Function test_parse_output_desc

cln-rpc/src/primitives.rs:537–550  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

535
536 #[test]
537 fn test_parse_output_desc() {
538 let a = r#"{"address":"1234msat"}"#;
539 let od = serde_json::from_str(a).unwrap();
540
541 assert_eq!(
542 OutputDesc {
543 address: "address".to_string(),
544 amount: Amount { msat: 1234 }
545 },
546 od
547 );
548 let serialized: String = serde_json::to_string(&od).unwrap();
549 assert_eq!(a, serialized);
550 }
551}
552
553#[derive(Clone, Debug, PartialEq)]

Callers

nothing calls this directly

Calls 2

unwrapMethod · 0.80
to_stringFunction · 0.50

Tested by

no test coverage detected