Module polkadot_sdk_frame::testing_prelude
source · Expand description
The main testing prelude of FRAME.
A test setup typically starts with:
use polkadot_sdk_frame::testing_prelude::*;
// rest of your test setup.
This automatically brings in polkadot_sdk_frame::prelude::*
and
polkadot_sdk_frame::runtime::prelude::*
.
Re-exports§
pub use frame_system;
pub use crate::prelude::*;
pub use crate::runtime::prelude::*;
pub use super::runtime::testing_prelude::*;
Macros§
- Other helper macros from
frame_support
that help with asserting in tests. Assert an expression returns an error specified. - Other helper macros from
frame_support
that help with asserting in tests. Assert an expression returns an error specified. - Other helper macros from
frame_support
that help with asserting in tests. Assert that the maximum encoding size does not exceed the value defined in [MAX_MODULE_ERROR_ENCODED_SIZE
] during compilation. - Other helper macros from
frame_support
that help with asserting in tests. Evaluate an expression, assert it returns an expectedErr
value and that runtime storage has not been mutated (i.e. expression is a no-operation). - Other helper macros from
frame_support
that help with asserting in tests. Panic if an expression doesn’t evaluate toOk
. - Other helper macros from
frame_support
that help with asserting in tests. Evaluate any expression and assert that runtime storage has not been mutated (i.e. expression is a storage no-operation).
Type Aliases§
- An implementation of
sp_runtime::traits::Block
to be used in tests. - An implementation of
sp_runtime::traits::Block
to be used in tests with u32 BlockNumber type. - An implementation of
sp_runtime::traits::Block
to be used in tests with u128 BlockNumber type. - An unchecked extrinsic type to be used in tests.
- Type alias for Externalities implementation used in tests.
- Type alias for Externalities implementation used in tests.
Attribute Macros§
- Other helper macros from
frame_support
that help with asserting in tests.