Skip to main content

Crate miden_testing

Crate miden_testing 

Source

Modules§

asserts
Assertion macro for note-lifecycle checks in tests.
executor
utils

Macros§

assert_execution_error
Asserts that a Result<_, ExecError> failed as expected.
assert_note_created
Asserts the tx emitted a note matching the spec. Fields are optional; unset ones are skipped.
assert_transaction_executor_error
Same as assert_execution_error!, but for TransactionExecutorError. The matches and $expected arms unwrap TransactionProgramExecutionFailed(_) and match against the inner ExecutionError.

Structs§

ExecError
A newtype wrapper around ExecutionError that provides better error messages by using PrintDiagnostic for display formatting.
MockChain
The MockChain simulates a simplified blockchain environment for testing purposes.
MockChainBuilder
A builder for a MockChain’s genesis block.
TransactionContext
Represents all needed data for executing a transaction, or arbitrary code.
TransactionContextBuilder
TransactionContextBuilder is a utility to construct TransactionContext for testing purposes. It allows users to build accounts, create notes, provide advice inputs, and execute code. The VM process can be inspected afterward.

Enums§

AccountState
Helper type for increased readability at call-sites. Indicates whether to build a new (nonce = ZERO) or existing account (nonce = ONE).
Auth
Specifies which authentication mechanism is desired for accounts
MockChainNote
Represents a note that is stored in the mock chain.
TxContextInput
Helper type to abstract over the inputs to MockChain::build_tx_context. See that method’s docs for details.