mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 17:31:05 +00:00
frame-support-test: migrate tests from decl_* macros to the new pallet macros (#12445)
* frame-support: migrate some tests from decl macros to new pallet attribute macros * Remove useless type alias * Remove useless type alias * frame-support-test: migrate old decl_macros to new pallet attribute macros * fmt Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix features Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Remove deprecated stuff Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update UI tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix UI test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Fix test Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Update UI tests Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> * Cleanup Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> --------- Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io> Co-authored-by: parity-processbot <>
This commit is contained in:
@@ -14,7 +14,7 @@ targets = ["x86_64-unknown-linux-gnu"]
|
||||
[dependencies]
|
||||
codec = { package = "parity-scale-codec", version = "3.2.2", default-features = false, features = ["derive"] }
|
||||
scale-info = { version = "2.5.0", default-features = false, features = ["derive"] }
|
||||
frame-support = { version = "4.0.0-dev", default-features = false, path = "../../" }
|
||||
renamed-frame-support = { package = "frame-support", version = "4.0.0-dev", default-features = false, path = "../../" }
|
||||
frame-system = { version = "4.0.0-dev", default-features = false, path = "../../../system" }
|
||||
sp-core = { version = "7.0.0", default-features = false, path = "../../../../primitives/core" }
|
||||
sp-runtime = { version = "7.0.0", default-features = false, path = "../../../../primitives/runtime" }
|
||||
@@ -24,7 +24,7 @@ sp-version = { version = "5.0.0", default-features = false, path = "../../../../
|
||||
default = ["std"]
|
||||
std = [
|
||||
"codec/std",
|
||||
"frame-support/std",
|
||||
"renamed-frame-support/std",
|
||||
"frame-system/std",
|
||||
"scale-info/std",
|
||||
"sp-core/std",
|
||||
|
||||
@@ -16,15 +16,13 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
// `construct_runtime!` does a lot of recursion and requires us to increase the limit to 256.
|
||||
#![recursion_limit = "256"]
|
||||
//! This crate tests that `construct_runtime!` expands the pallet parts
|
||||
//! correctly even when frame-support is renamed in Cargo.toml
|
||||
//! Test that `construct_runtime!` also works when `frame-support` is renamed in the `Cargo.toml`.
|
||||
|
||||
use frame_support::{
|
||||
#![cfg_attr(not(feature = "std"), no_std)]
|
||||
|
||||
use renamed_frame_support::{
|
||||
construct_runtime, parameter_types,
|
||||
traits::{ConstU16, ConstU32, ConstU64},
|
||||
traits::{ConstU16, ConstU32, ConstU64, Everything},
|
||||
};
|
||||
use sp_core::{sr25519, H256};
|
||||
use sp_runtime::{
|
||||
@@ -54,7 +52,7 @@ parameter_types! {
|
||||
}
|
||||
|
||||
impl frame_system::Config for Runtime {
|
||||
type BaseCallFilter = frame_support::traits::Everything;
|
||||
type BaseCallFilter = Everything;
|
||||
type BlockWeights = ();
|
||||
type BlockLength = ();
|
||||
type Index = u128;
|
||||
|
||||
Reference in New Issue
Block a user