diff --git a/polkadot/runtime/common/src/auctions.rs b/polkadot/runtime/common/src/auctions.rs index e605328885eb793d56f01ab87141437635f170fe..1dddacc92c1f891c0e744affa97fac5b1114e1f9 100644 --- a/polkadot/runtime/common/src/auctions.rs +++ b/polkadot/runtime/common/src/auctions.rs @@ -1708,7 +1708,7 @@ mod benchmarking { use frame_system::RawOrigin; use sp_runtime::{traits::Bounded, SaturatedConversion}; - use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller}; + use frame_benchmarking::{account, benchmarks, whitelisted_caller}; fn assert_last_event<T: Config>(generic_event: <T as Config>::Event) { let events = frame_system::Pallet::<T>::events(); @@ -1883,11 +1883,11 @@ mod benchmarking { verify { assert!(AuctionInfo::<T>::get().is_none()); } - } - impl_benchmark_test_suite!( - Auctions, - crate::integration_tests::new_test_ext(), - crate::integration_tests::Test, - ); + impl_benchmark_test_suite!( + Auctions, + crate::integration_tests::new_test_ext(), + crate::integration_tests::Test, + ); + } } diff --git a/polkadot/runtime/common/src/claims.rs b/polkadot/runtime/common/src/claims.rs index a89bd0b4d03a7a5079afdd9c06cd9d791a128c3d..cd62e204854b1e8312356f5729175b05cabae29a 100644 --- a/polkadot/runtime/common/src/claims.rs +++ b/polkadot/runtime/common/src/claims.rs @@ -1589,13 +1589,8 @@ mod benchmarking { assert!(super::Pallet::<T>::eth_recover(&signature, &data, extra).is_some()); } } - } - - #[cfg(test)] - mod tests { - use super::*; - frame_benchmarking::impl_benchmark_test_suite!( + impl_benchmark_test_suite!( Pallet, crate::claims::tests::new_test_ext(), crate::claims::tests::Test, diff --git a/polkadot/runtime/common/src/crowdloan.rs b/polkadot/runtime/common/src/crowdloan.rs index 115a89fac54211550ed364cd755eb033cfee245f..d496617730fa7c222f78ae167db528dc80cc94d4 100644 --- a/polkadot/runtime/common/src/crowdloan.rs +++ b/polkadot/runtime/common/src/crowdloan.rs @@ -1857,7 +1857,7 @@ mod benchmarking { use sp_runtime::traits::{Bounded, CheckedSub}; use sp_std::prelude::*; - use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller}; + use frame_benchmarking::{account, benchmarks, whitelisted_caller}; fn assert_last_event<T: Config>(generic_event: <T as Config>::Event) { let events = frame_system::Pallet::<T>::events(); @@ -2105,11 +2105,11 @@ mod benchmarking { assert_eq!(EndingsCount::<T>::get(), old_endings_count + 1); assert_last_event::<T>(Event::<T>::HandleBidResult((n - 1).into(), Ok(())).into()); } - } - impl_benchmark_test_suite!( - Crowdloan, - crate::integration_tests::new_test_ext_with_offset(10), - crate::integration_tests::Test, - ); + impl_benchmark_test_suite!( + Crowdloan, + crate::integration_tests::new_test_ext_with_offset(10), + crate::integration_tests::Test, + ); + } } diff --git a/polkadot/runtime/common/src/paras_registrar.rs b/polkadot/runtime/common/src/paras_registrar.rs index 448bc509240369120292a642ffe2e6be226ff8af..6b6c8fd493edb836747a7390c6692d3ebe4c021a 100644 --- a/polkadot/runtime/common/src/paras_registrar.rs +++ b/polkadot/runtime/common/src/paras_registrar.rs @@ -1048,7 +1048,7 @@ mod benchmarking { use runtime_parachains::{paras, shared, Origin as ParaOrigin}; use sp_runtime::traits::Bounded; - use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller}; + use frame_benchmarking::{account, benchmarks, whitelisted_caller}; fn assert_last_event<T: Config>(generic_event: <T as Config>::Event) { let events = frame_system::Pallet::<T>::events(); @@ -1160,11 +1160,11 @@ mod benchmarking { assert_eq!(paras::Pallet::<T>::lifecycle(parachain), Some(ParaLifecycle::Parathread)); assert_eq!(paras::Pallet::<T>::lifecycle(parathread), Some(ParaLifecycle::Parachain)); } - } - impl_benchmark_test_suite!( - Registrar, - crate::integration_tests::new_test_ext(), - crate::integration_tests::Test, - ); + impl_benchmark_test_suite!( + Registrar, + crate::integration_tests::new_test_ext(), + crate::integration_tests::Test, + ); + } } diff --git a/polkadot/runtime/common/src/slots.rs b/polkadot/runtime/common/src/slots.rs index 35c520afeaf1beb0fac69d3a87d8bbda32d4c825..26ada547c7fe52947a450a19f464a77bc7e2898a 100644 --- a/polkadot/runtime/common/src/slots.rs +++ b/polkadot/runtime/common/src/slots.rs @@ -975,7 +975,7 @@ mod benchmarking { use frame_system::RawOrigin; use sp_runtime::traits::Bounded; - use frame_benchmarking::{account, benchmarks, impl_benchmark_test_suite, whitelisted_caller}; + use frame_benchmarking::{account, benchmarks, whitelisted_caller}; use crate::slots::Pallet as Slots; @@ -1112,11 +1112,11 @@ mod benchmarking { T::Registrar::execute_pending_transitions(); assert!(T::Registrar::is_parachain(para)); } - } - impl_benchmark_test_suite!( - Slots, - crate::integration_tests::new_test_ext(), - crate::integration_tests::Test, - ); + impl_benchmark_test_suite!( + Slots, + crate::integration_tests::new_test_ext(), + crate::integration_tests::Test, + ); + } } diff --git a/polkadot/runtime/parachains/src/configuration/benchmarking.rs b/polkadot/runtime/parachains/src/configuration/benchmarking.rs index 8b319cb8fabbeb4d54d569810cdca704541a1f57..4b98f22c7f76463e1ec4fe8f27c3140f9d06354a 100644 --- a/polkadot/runtime/parachains/src/configuration/benchmarking.rs +++ b/polkadot/runtime/parachains/src/configuration/benchmarking.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see <http://www.gnu.org/licenses/>. use crate::configuration::*; -use frame_benchmarking::{benchmarks, impl_benchmark_test_suite, BenchmarkError, BenchmarkResult}; +use frame_benchmarking::{benchmarks, BenchmarkError, BenchmarkResult}; use frame_system::RawOrigin; use sp_runtime::traits::One; @@ -35,10 +35,10 @@ benchmarks! { } set_config_with_balance {}: set_hrmp_sender_deposit(RawOrigin::Root, 100_000_000_000) -} -impl_benchmark_test_suite!( - Pallet, - crate::mock::new_test_ext(Default::default()), - crate::mock::Test -); + impl_benchmark_test_suite!( + Pallet, + crate::mock::new_test_ext(Default::default()), + crate::mock::Test + ); +} diff --git a/polkadot/runtime/parachains/src/disputes/benchmarking.rs b/polkadot/runtime/parachains/src/disputes/benchmarking.rs index b884d1a6e7996da335ab2b145ac184e303c79634..fc54c4929323e658d6403bd7454add2f4c0df9bb 100644 --- a/polkadot/runtime/parachains/src/disputes/benchmarking.rs +++ b/polkadot/runtime/parachains/src/disputes/benchmarking.rs @@ -16,7 +16,7 @@ use super::*; -use frame_benchmarking::{benchmarks, impl_benchmark_test_suite}; +use frame_benchmarking::benchmarks; use frame_system::RawOrigin; use sp_runtime::traits::One; @@ -27,10 +27,10 @@ benchmarks! { verify { assert!(Frozen::<T>::get().is_none()) } -} -impl_benchmark_test_suite!( - Pallet, - crate::mock::new_test_ext(Default::default()), - crate::mock::Test -); + impl_benchmark_test_suite!( + Pallet, + crate::mock::new_test_ext(Default::default()), + crate::mock::Test + ); +} diff --git a/polkadot/runtime/parachains/src/initializer/benchmarking.rs b/polkadot/runtime/parachains/src/initializer/benchmarking.rs index d73c427f133d1c99c2a81b3ba277526560a51c7e..c6fb38d68f86bf31af11609426ac62dc91de1f87 100644 --- a/polkadot/runtime/parachains/src/initializer/benchmarking.rs +++ b/polkadot/runtime/parachains/src/initializer/benchmarking.rs @@ -15,7 +15,7 @@ // along with Polkadot. If not, see <http://www.gnu.org/licenses/>. use super::*; -use frame_benchmarking::{benchmarks, impl_benchmark_test_suite}; +use frame_benchmarking::benchmarks; use frame_system::{DigestItemOf, RawOrigin}; use primitives::v1::ConsensusLog; @@ -35,10 +35,10 @@ benchmarks! { &<DigestItemOf<T>>::from(ConsensusLog::ForceApprove(d + 1)), ); } -} -impl_benchmark_test_suite!( - Pallet, - crate::mock::new_test_ext(Default::default()), - crate::mock::Test -); + impl_benchmark_test_suite!( + Pallet, + crate::mock::new_test_ext(Default::default()), + crate::mock::Test + ); +} diff --git a/polkadot/runtime/parachains/src/paras/benchmarking.rs b/polkadot/runtime/parachains/src/paras/benchmarking.rs index 2e9a26c260a30b074ce4b0a1727f586c6a6c1c49..b37ee5b83618fcaa8b2297c718e6b2a98f9c2f91 100644 --- a/polkadot/runtime/parachains/src/paras/benchmarking.rs +++ b/polkadot/runtime/parachains/src/paras/benchmarking.rs @@ -16,7 +16,7 @@ use super::*; use crate::{configuration::HostConfiguration, shared}; -use frame_benchmarking::{benchmarks, impl_benchmark_test_suite}; +use frame_benchmarking::benchmarks; use frame_system::RawOrigin; use primitives::v1::{HeadData, Id as ParaId, ValidationCode, MAX_CODE_SIZE, MAX_HEAD_DATA_SIZE}; use sp_runtime::traits::{One, Saturating}; @@ -126,10 +126,10 @@ benchmarks! { let next_session = crate::shared::Pallet::<T>::session_index().saturating_add(One::one()); assert_last_event::<T>(Event::ActionQueued(para_id, next_session).into()); } -} -impl_benchmark_test_suite!( - Pallet, - crate::mock::new_test_ext(Default::default()), - crate::mock::Test -); + impl_benchmark_test_suite!( + Pallet, + crate::mock::new_test_ext(Default::default()), + crate::mock::Test + ); +} diff --git a/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/benchmarking.rs b/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/benchmarking.rs index b93184e0455d6e67836ded96402f36af96a6f2c5..3a71d771c11d1e43d3cde00729a1cf71412d9e1c 100644 --- a/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/benchmarking.rs +++ b/polkadot/xcm/pallet-xcm-benchmarks/src/fungible/benchmarking.rs @@ -16,9 +16,7 @@ use super::*; use crate::{account_and_location, new_executor, worst_case_holding, AssetTransactorOf, XcmCallOf}; -use frame_benchmarking::{ - benchmarks_instance_pallet, impl_benchmark_test_suite, BenchmarkError, BenchmarkResult, -}; +use frame_benchmarking::{benchmarks_instance_pallet, BenchmarkError, BenchmarkResult}; use frame_support::{pallet_prelude::Get, traits::fungible::Inspect}; use sp_runtime::traits::Zero; use sp_std::{convert::TryInto, prelude::*, vec}; @@ -210,10 +208,10 @@ benchmarks_instance_pallet! { assert!(!T::TransactAsset::balance(&checked_account).is_zero()); } } -} -impl_benchmark_test_suite!( - Pallet, - crate::fungible::mock::new_test_ext(), - crate::fungible::mock::Test -); + impl_benchmark_test_suite!( + Pallet, + crate::fungible::mock::new_test_ext(), + crate::fungible::mock::Test + ); +}