mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
Test each benchmark case in own #[test] (#9860)
* Generate one #[test] fn per bench case. * Update benchmark macro syntax in frame pallets. * Explain new benchmark macro syntax in example pallet. * support with and without a semicolon * update pallets to use individual tests * migrate staking too * migrate more pallets * fix up democracy and use individual tests * Fix comment * Put println message in panic * Remove `another_set_dummy` from doc `another_set_dummy` is not present in the benchmarking.rs (anymore). * Update doc for benchmarks macro * Update doc for impl_benchmark_test_suite macro Co-authored-by: Shawn Tabrizi <shawntabrizi@gmail.com>
This commit is contained in:
@@ -21,9 +21,7 @@
|
||||
|
||||
use super::*;
|
||||
|
||||
use frame_benchmarking::{
|
||||
account, benchmarks_instance_pallet, impl_benchmark_test_suite, whitelisted_caller,
|
||||
};
|
||||
use frame_benchmarking::{account, benchmarks_instance_pallet, whitelisted_caller};
|
||||
use frame_system::RawOrigin;
|
||||
use sp_runtime::traits::Bounded;
|
||||
|
||||
@@ -215,10 +213,10 @@ benchmarks_instance_pallet! {
|
||||
assert!(Balances::<T, I>::reserved_balance(&user).is_zero());
|
||||
assert_eq!(Balances::<T, I>::free_balance(&user), balance);
|
||||
}
|
||||
}
|
||||
|
||||
impl_benchmark_test_suite!(
|
||||
Balances,
|
||||
crate::tests_composite::ExtBuilder::default().build(),
|
||||
crate::tests_composite::Test,
|
||||
);
|
||||
impl_benchmark_test_suite!(
|
||||
Balances,
|
||||
crate::tests_composite::ExtBuilder::default().build(),
|
||||
crate::tests_composite::Test,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user