()
| 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() { |
nothing calls this directly
no test coverage detected