Files
pezkuwi-runtime-templates/generic-template/runtime/tests/common/mod.rs
T
Özgün Özerk 9b9845920c Update docs (#261)
* typos and broken links

* evm runtime docs

* name change in code

* generic runtime description updated, and typos

* smart contract with zombienet

* quick start exported into another document and further formatting
2024-08-07 11:41:55 -04:00

13 lines
467 B
Rust

// ExtBuilder impl for all runtime integration tests
use frame_support::weights::Weight;
use generic_runtime_template::{BuildStorage, Runtime, System};
pub fn run_with_system_weight<F: FnMut()>(w: Weight, mut assertions: F) {
let mut t: sp_io::TestExternalities =
frame_system::GenesisConfig::<Runtime>::default().build_storage().unwrap().into();
t.execute_with(|| {
System::set_block_consumed_resources(w, 0);
assertions()
});
}