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

Function expr_roundtrip

crates/ixon/src/expr.rs:308–318  ·  view source on GitHub ↗
(e: &Expr)

Source from the content-addressed store, hash-verified

306 }
307
308 fn expr_roundtrip(e: &Expr) -> bool {
309 let mut buf = Vec::new();
310 put_expr(e, &mut buf);
311 match get_expr(&mut buf.as_slice()) {
312 Ok(e2) => e == e2.as_ref(),
313 Err(err) => {
314 eprintln!("expr_roundtrip error: {err}");
315 false
316 },
317 }
318 }
319
320 #[quickcheck]
321 fn prop_expr_roundtrip(e: ArbitraryExpr) -> bool {

Callers 1

prop_expr_roundtripFunction · 0.85

Calls 3

put_exprFunction · 0.85
get_exprFunction · 0.85
as_sliceMethod · 0.80

Tested by

no test coverage detected