Fix bags-list tests execution (#14047)

The `test` feature isn't propagated to dependencies in Rust, so we should just enable the method as
well for `std`.
This commit is contained in:
Bastian Köcher
2023-05-01 09:47:43 +02:00
committed by GitHub
parent 4df004d0d4
commit 9a3555d2e2
3 changed files with 17 additions and 7 deletions
@@ -582,7 +582,7 @@ pub trait ScoreProvider<AccountId> {
fn score(who: &AccountId) -> Self::Score;
/// For tests, benchmarks and fuzzing, set the `score`.
#[cfg(any(feature = "runtime-benchmarks", feature = "fuzz", test))]
#[cfg(any(feature = "runtime-benchmarks", feature = "fuzz", feature = "std"))]
fn set_score_of(_: &AccountId, _: Self::Score) {}
}
@@ -673,5 +673,14 @@ pub type BoundedSupportsOf<E> = BoundedSupports<
<E as ElectionProviderBase>::MaxWinners,
>;
sp_core::generate_feature_enabled_macro!(runtime_benchmarks_enabled, feature = "runtime-benchmarks", $);
sp_core::generate_feature_enabled_macro!(runtime_benchmarks_or_fuzz_enabled, any(feature = "runtime-benchmarks", feature = "fuzzing"), $);
sp_core::generate_feature_enabled_macro!(
runtime_benchmarks_enabled,
feature = "runtime-benchmarks",
$
);
sp_core::generate_feature_enabled_macro!(
runtime_benchmarks_fuzz_or_std_enabled,
any(feature = "runtime-benchmarks", feature = "fuzzing", feature = "std"),
$
);