Files
pezkuwi-runtime-templates/evm-template/runtime/tests/common/mod.rs
T

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()
});
}