miden-processor 0.9.2

Miden VM processor
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::{DefaultHost, ExecutionOptions, Kernel, Operation, Process, StackInputs};

// Check that process returns an error if a maximum number of cycles is exceeded.
#[test]
fn cycles_num_exceeded() {
    let stack = StackInputs::default();
    let host = DefaultHost::default();
    let mut process = Process::new(
        Kernel::default(),
        stack,
        host,
        ExecutionOptions::new(Some(64), 64, false).unwrap(),
    );
    for _ in 0..64 {
        process.execute_op(Operation::Noop).unwrap();
    }
    assert!(process.execute_op(Operation::Noop).is_err());
}