MCPcopy Create free account
hub / github.com/SeaQL/FireDBG.for.Rust / test_serde_addr

Function test_serde_addr

protocol/src/value.rs:967–975  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

965
966 #[test]
967 fn test_serde_addr() {
968 let addr = Addr([0x12, 0x34, 0x56, 0x78, 0xab, 0xcd, 0xef, 0x00]);
969 let ref_addr = RefAddr::Addr(addr);
970 assert_eq!(addr.to_string().as_str(), "0x00efcdab78563412");
971 assert_eq!(ref_addr.to_string().as_str(), "0x00efcdab78563412");
972 assert_eq!(addr, "0x00efcdab78563412".parse().unwrap());
973 assert_eq!(ref_addr, "0x00efcdab78563412".parse().unwrap());
974 assert_eq!(RefAddr::Redacted, "<redacted>".parse().unwrap());
975 }
976}

Callers

nothing calls this directly

Calls 1

AddrClass · 0.85

Tested by

no test coverage detected