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

Function telescope_lam_byte_boundaries

crates/ixon/src/expr.rs:405–419  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

403
404 #[test]
405 fn telescope_lam_byte_boundaries() {
406 for (n, tag_bytes) in
407 [(1u64, 1), (7, 1), (8, 2), (255, 2), (256, 3), (500, 3)]
408 {
409 let ty = Expr::var(1);
410 let mut expr: Arc<Expr> = Expr::var(0);
411 for _ in 0..n {
412 expr = Expr::lam(ty.clone(), expr);
413 }
414 let mut buf = Vec::new();
415 put_expr(expr.as_ref(), &mut buf);
416 assert_eq!(buf.len(), tag_bytes + (n as usize) + 1);
417 assert!(expr_roundtrip(&expr));
418 }
419 }
420
421 #[test]
422 fn expr_and_constant_flags_unique() {

Callers

nothing calls this directly

Calls 4

put_exprFunction · 0.85
varFunction · 0.50
lamFunction · 0.50
cloneMethod · 0.45

Tested by

no test coverage detected