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

Function check_accepts_with_prims

crates/kernel/src/testing.rs:246–257  ·  view source on GitHub ↗

Check with custom primitives (needed for Nat literal tests etc.)

(
  env: &mut KEnv<Meta>,
  id: &MId,
  prims: super::primitive::Primitives<Meta>,
)

Source from the content-addressed store, hash-verified

244
245/// Check with custom primitives (needed for Nat literal tests etc.)
246pub fn check_accepts_with_prims(
247 env: &mut KEnv<Meta>,
248 id: &MId,
249 prims: super::primitive::Primitives<Meta>,
250) {
251 let mut tc = TypeChecker::new(env);
252 tc.prims = prims;
253 match tc.check_const(id) {
254 Ok(()) => {},
255 Err(e) => panic!("expected {id} to be accepted, got error: {e:?}"),
256 }
257}
258
259/// Build Primitives resolved from a test environment.
260/// The env should contain all the primitives the test needs.

Callers 6

good_nat_litFunction · 0.85
good_nat_lit_eqFunction · 0.85
good_quot_mk_typeFunction · 0.85
good_quot_lift_typeFunction · 0.85
good_quot_ind_typeFunction · 0.85
good_quot_lift_reductionFunction · 0.85

Calls 1

check_constMethod · 0.80

Tested by

no test coverage detected