Module frame_support::testing_prelude
source · Expand description
Prelude to be used for pallet testing, for ease of use.
Modules
- Traits, types and structs to support a bounded BTreeMap.
- Traits, types and structs to support putting a bounded vector into storage, as a raw value, map or a double map.
Macros
- Copied from
sp-runtime
and documented there. - Assert an expression returns an error specified.
- Assert an expression returns an error specified.
- Assert an expression returns error with the given weight.
- Assert that the maximum encoding size does not exceed the value defined in
MAX_MODULE_ERROR_ENCODED_SIZE
during compilation. - 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). - Panic if an expression doesn’t evaluate to
Ok
. - Evaluate any expression and assert that runtime storage has not been mutated (i.e. expression is a storage no-operation).
- Build a bounded btree-map from the given literals.
- Build a bounded vec from the given literals.
- Create new implementations of the
Get
trait.
Traits
- A trait for querying a single value from a type.