mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-05-01 17:07:56 +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:
@@ -63,6 +63,12 @@ benchmarks! {
|
||||
} verify {
|
||||
assert!(sp_consensus_babe::check_equivocation_proof::<Header>(equivocation_proof2));
|
||||
}
|
||||
|
||||
impl_benchmark_test_suite!(
|
||||
Pallet,
|
||||
crate::mock::new_test_ext(3),
|
||||
crate::mock::Test,
|
||||
)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
@@ -70,12 +76,6 @@ mod tests {
|
||||
use super::*;
|
||||
use crate::mock::*;
|
||||
|
||||
frame_benchmarking::impl_benchmark_test_suite!(
|
||||
Pallet,
|
||||
crate::mock::new_test_ext(3),
|
||||
crate::mock::Test,
|
||||
);
|
||||
|
||||
#[test]
|
||||
fn test_generate_equivocation_report_blob() {
|
||||
let (pairs, mut ext) = new_test_ext_with_pairs(3);
|
||||
|
||||
Reference in New Issue
Block a user