MCPcopy Create free account
hub / github.com/argumentcomputer/ix / roundtrip

Function roundtrip

crates/ixon/src/univ.rs:247–254  ·  view source on GitHub ↗
(u: &Univ)

Source from the content-addressed store, hash-verified

245 }
246
247 fn roundtrip(u: &Univ) -> bool {
248 let mut buf = Vec::new();
249 put_univ(u, &mut buf);
250 match get_univ(&mut buf.as_slice()) {
251 Ok(result) => result.as_ref() == u,
252 Err(_) => false,
253 }
254 }
255
256 #[quickcheck]
257 fn prop_univ_roundtrip(u: ArbitraryUniv) -> bool {

Callers 1

prop_univ_roundtripFunction · 0.70

Calls 3

put_univFunction · 0.85
get_univFunction · 0.85
as_sliceMethod · 0.80

Tested by

no test coverage detected