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

Function with_infer_only_nested_restores

crates/kernel/src/tc.rs:1530–1542  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1528 #[test]
1529 fn tick_consumes_fuel() {
1530 let mut tc = new_tc();
1531 tc.rec_fuel = 3;
1532 assert!(tc.tick().is_ok());
1533 assert!(tc.tick().is_ok());
1534 assert!(tc.tick().is_ok());
1535 match tc.tick() {
1536 Err(TcError::MaxRecFuel) => {},
1537 other => panic!("expected MaxRecFuel, got {other:?}"),
1538 }
1539 }
1540
1541 #[test]
1542 fn tick_exhaustion_at_zero() {
1543 let mut tc = new_tc();
1544 tc.rec_fuel = 0;
1545 match tc.tick() {

Callers

nothing calls this directly

Calls 2

new_tcFunction · 0.85
with_infer_onlyMethod · 0.80

Tested by

no test coverage detected