mirror of
https://github.com/pezkuwichain/pezkuwi-runtime-templates.git
synced 2026-04-21 23:47:56 +00:00
13 lines
472 B
Rust
13 lines
472 B
Rust
// ExtBuilder impl for all runtime integration tests
|
|
use evm_runtime_template::{BuildStorage, Runtime, System};
|
|
use pezframe_support::weights::Weight;
|
|
|
|
pub fn run_with_system_weight<F: FnMut()>(w: Weight, mut assertions: F) {
|
|
let mut t: pezsp_io::TestExternalities =
|
|
pezframe_system::GenesisConfig::<Runtime>::default().build_storage().unwrap().into();
|
|
t.execute_with(|| {
|
|
System::set_block_consumed_resources(w, 0);
|
|
assertions()
|
|
});
|
|
}
|