Skip to main content Crate miden_test_utils Copy item path Source pub use proptest;crypto math rand serde assert_assembler_diagnostic assert_diagnostic_lines Like [miden_assembly::testing::assert_diagnostic], but matches each non-empty line of the
rendered output to a corresponding pattern. assert_eq Asserts that two expressions are equal to each other (using PartialEq ). assert_ne Asserts that two expressions are not equal to each other (using PartialEq ). assert_str_eq Asserts that two expressions are equal to each other (using PartialEq ). build_debug_test Returns a Test struct in debug mode from the provided source string and any specified stack
and advice inputs. build_op_test Returns a Test struct in non debug mode from a string of one or more operations and any
specified stack and advice inputs. build_test Returns a Test struct in non debug mode from the provided source string, and any specified
stack and advice inputs. build_test_by_mode Returns a Test struct in the specified debug or non-debug mode using the provided source string
and any specified stack and advice inputs. expect_assembly_error Asserts that running the given assembler test will result in the expected error. expect_exec_error_matches Asserts that running the given execution test will result in the expected error. stack Creates a Vec<u64> for stack inputs where the first element will be on top of the stack. AdviceInputs Inputs container to initialize advice provider for the execution of Miden VM programs. AdviceProvider An advice provider is a component through which the VM can request nondeterministic inputs from
the host (i.e., result of a computation performed outside of the VM), as well as insert new data
into the advice provider to be recovered by the host after the program has finished executing. AdviceStackBuilder A builder for constructing advice stack inputs with intuitive ordering. BufferWriter A writer that buffers output in a String for testing debug output. ContextId Represents the ID of an execution context DefaultSourceManager ExecutionTrace Execution trace which is generated when a program is executed on the VM. Felt A Felt backed by Plonky3’s Goldilocks field element. Path A borrowed reference to a subset of a path, e.g. another Path or a [PathBuf] ProcessorState A view into the current state of the processor. ProvingOptions A set of parameters specifying how Miden VM execution proofs are to be generated. Report Core Diagnostic wrapper type. SourceFile A SourceFile represents a single file stored in a super::SourceManager StackInputs Defines the initial state of the VM’s operand stack. StackOutputs Defines the final state of the VM’s operand stack at the end of program execution. Test This is a container for the data required to run tests, which allows for running several
different types of tests. Word A unit of data consisting of 4 field elements. ExecutionError SourceLanguage EMPTY_WORD Array of field elements representing word of ZEROs in the Miden base field. MIN_STACK_DEPTH Represents: ONE Field element representing ONE in the Miden base filed. STATE_WIDTH Number of field element needed to represent the sponge state for the hash function. TRUNCATE_STACK_PROC A source code of the truncate_stack procedure. U32_BOUND A value just over what a u32 integer can hold. WORD_SIZE Number of field elements in a word. ZERO Field element representing ZERO in the Miden base filed. Field A field F. This permits both modular fields ℤ/p along with their field extensions. IntoBytes PrimeCharacteristicRing A commutative ring, R, with prime characteristic, p. PrimeField64 A prime field ℤ/p with order, p < 2^64. SourceManager ToElements append_word_to_vec Appends a Word to an operand stack Vec. build_expected_hash build_expected_perm Given a hasher state, perform one permutation. felt_slice_to_ints Converts a slice of Felts into a vector of u64 values. get_column_name Helper function to get column name for debugging group_slice_elements Transmutes a slice of n elements into a slice of n / N elements, each of which is
an array of N elements. hash_elements Returns a hash of the provided list of field elements. prop_randw A proptest strategy for generating a random word with 4 values of type T. prove Executes and proves the specified program and returns the result together with a STARK-based
proof of the program’s execution. prove_sync Synchronous wrapper for prove() . push_inputs resize_to_min_stack_depth verify Returns the security level of the proof if the specified program was executed correctly against
the specified inputs and outputs. QuadFelt test_case Generates tests for given set of data