[][src]Module cosmwasm_vm::testing

Structs

MockApi
MockInstanceOptions
MockQuerier

MockQuerier holds an immutable table of bank balances TODO: also allow querying contracts

MockStorage

Constants

MOCK_CONTRACT_ADDR

Functions

handle
init
migrate
mock_dependencies

All external requirements that can be injected for unit tests. It sets the given balance for the contract itself, nothing else

mock_dependencies_with_balances

Initializes the querier along with the mock_dependencies. Sets all balances provided (yoy must explicitly set contract balance if desired)

mock_env

Just set sender and sent funds for the message. The rest uses defaults. The sender will be canonicalized internally to allow developers pasing in human readable senders. This is intended for use in test code only.

mock_instance
mock_instance_with_balances
mock_instance_with_failing_api
mock_instance_with_gas_limit
mock_instance_with_options
query
test_io

Runs a series of IO tests, hammering especially on allocate and deallocate. This could be especially useful when run with some kind of leak detector.