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.
MockTransaction
Represents all needed data for executing a transaction, or arbitrary code.
MockTransactionBuilder
A builder for a MockTransaction that is coupled to a concrete MockChain.

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.
MockTransactionInput
Helper type to abstract over the account input to MockChain::build_transaction. See that method’s docs for details.