Module testing_prelude

Source
Expand description

Prelude to be used for pallet testing, for ease of use.

Modules§

bounded_btree_map
Traits, types and structs to support a bounded BTreeMap.
bounded_vec
Traits, types and structs to support putting a bounded vector into storage, as a raw value, map or a double map.

Macros§

assert_eq_error_rate
Copied from sp-runtime and documented there.
assert_err
Assert an expression returns an error specified.
assert_err_ignore_postinfo
Assert an expression returns an error specified.
assert_err_with_weight
Assert an expression returns error with the given weight.
assert_error_encoded_size
Assert that the maximum encoding size does not exceed the value defined in MAX_MODULE_ERROR_ENCODED_SIZE during compilation.
assert_noop
Evaluate an expression, assert it returns an expected Err value and that runtime storage has not been mutated (i.e. expression is a no-operation).
assert_ok
Panic if an expression doesn’t evaluate to Ok.
assert_storage_noop
Evaluate any expression and assert that runtime storage has not been mutated (i.e. expression is a storage no-operation).
bounded_btree_map
Build a bounded btree-map from the given literals.
bounded_vec
Build a bounded vec from the given literals.
parameter_types
Create new implementations of the Get trait.

Traits§

Get
A trait for querying a single value from a type.