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

Function expr_const_addr_mismatch_fails

crates/kernel/src/congruence.rs:533–543  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

531
532 #[test]
533 fn expr_const_addr_mismatch_fails() {
534 let name = mk_name("Nat");
535 let r = resolver_with(&[(name.clone(), mk_addr("Nat"))]);
536
537 let lean_e = env::Expr::cnst(name.clone(), vec![]);
538 // Wrong address in zero_e
539 let zero_e =
540 KExpr::<Anon>::cnst(KId::new(mk_addr("Bogus"), ()), Box::new([]));
541 let e = expr_congruent(&lean_e, &zero_e, &r).unwrap_err();
542 assert!(e.contains("address mismatch"));
543 }
544
545 #[test]
546 fn expr_const_name_missing_from_resolver_fails() {

Callers

nothing calls this directly

Calls 6

resolver_withFunction · 0.85
expr_congruentFunction · 0.85
mk_nameFunction · 0.70
mk_addrFunction · 0.70
cnstFunction · 0.70
cloneMethod · 0.45

Tested by

no test coverage detected