Skip to content

Commit

Permalink
Remove duplicate comments (paritytech#6638)
Browse files Browse the repository at this point in the history
  • Loading branch information
kianenigma authored Jul 12, 2020
1 parent c590419 commit b5280cf
Show file tree
Hide file tree
Showing 14 changed files with 0 additions and 82 deletions.
7 changes: 0 additions & 7 deletions frame/assets/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,17 +284,12 @@ mod tests {

use frame_support::{impl_outer_origin, assert_ok, assert_noop, parameter_types, weights::Weight};
use sp_core::H256;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header};

impl_outer_origin! {
pub enum Origin for Test where system = frame_system {}
}

// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;
parameter_types! {
Expand Down Expand Up @@ -337,8 +332,6 @@ mod tests {
}
type Assets = Module<Test>;

// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
fn new_test_ext() -> sp_io::TestExternalities {
frame_system::GenesisConfig::default().build_storage::<Test>().unwrap().into()
}
Expand Down
5 changes: 0 additions & 5 deletions frame/atomic-swap/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ use frame_support::{
impl_outer_origin, parameter_types, weights::Weight,
};
use sp_core::H256;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{
Perbill,
testing::Header,
Expand All @@ -18,9 +16,6 @@ impl_outer_origin! {
pub enum Origin for Test where system = frame_system {}
}

// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, Debug, PartialEq)]
pub struct Test;
parameter_types! {
Expand Down
2 changes: 0 additions & 2 deletions frame/benchmarking/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,6 @@ impl OtherTrait for Test {
type OtherEvent = ();
}

// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
fn new_test_ext() -> sp_io::TestExternalities {
frame_system::GenesisConfig::default().build_storage::<Test>().unwrap().into()
}
Expand Down
8 changes: 0 additions & 8 deletions frame/evm/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ use frame_support::{
assert_ok, impl_outer_origin, parameter_types, impl_outer_dispatch,
};
use sp_core::H256;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{
Perbill,
testing::Header,
Expand All @@ -25,9 +23,6 @@ impl_outer_dispatch! {
}
}

// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;
parameter_types! {
Expand Down Expand Up @@ -111,8 +106,6 @@ type System = frame_system::Module<Test>;
type Balances = pallet_balances::Module<Test>;
type EVM = Module<Test>;

// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
pub fn new_test_ext() -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap();

Expand Down Expand Up @@ -140,7 +133,6 @@ pub fn new_test_ext() -> sp_io::TestExternalities {
}
);

// We use default for brevity, but you can configure as desired if needed.
pallet_balances::GenesisConfig::<Test>::default().assimilate_storage(&mut t).unwrap();
GenesisConfig { accounts }.assimilate_storage(&mut t).unwrap();
t.into()
Expand Down
5 changes: 0 additions & 5 deletions frame/generic-asset/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@ impl_outer_origin! {
pub enum Origin for Test where system = frame_system {}
}

// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;
parameter_types! {
Expand Down Expand Up @@ -147,8 +144,6 @@ impl ExtBuilder {
}
}

// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
pub fn new_test_ext() -> sp_io::TestExternalities {
frame_system::GenesisConfig::default()
.build_storage::<Test>()
Expand Down
8 changes: 0 additions & 8 deletions frame/identity/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1183,8 +1183,6 @@ mod tests {
};
use sp_core::H256;
use frame_system::{EnsureSignedBy, EnsureOneOf, EnsureRoot};
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{
Perbill, testing::Header, traits::{BlakeTwo256, IdentityLookup},
};
Expand All @@ -1193,9 +1191,6 @@ mod tests {
pub enum Origin for Test where system = frame_system {}
}

// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;
parameter_types! {
Expand Down Expand Up @@ -1282,11 +1277,8 @@ mod tests {
type Balances = pallet_balances::Module<Test>;
type Identity = Module<Test>;

// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
pub fn new_test_ext() -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap();
// We use default for brevity, but you can configure as desired if needed.
pallet_balances::GenesisConfig::<Test> {
balances: vec![
(1, 10),
Expand Down
7 changes: 0 additions & 7 deletions frame/membership/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,18 +284,13 @@ mod tests {
ord_parameter_types
};
use sp_core::H256;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup, BadOrigin}, testing::Header};
use frame_system::EnsureSignedBy;

impl_outer_origin! {
pub enum Origin for Test where system = frame_system {}
}

// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;
parameter_types! {
Expand Down Expand Up @@ -381,8 +376,6 @@ mod tests {

type Membership = Module<Test>;

// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
fn new_test_ext() -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap();
// We use default for brevity, but you can configure as desired if needed.
Expand Down
8 changes: 0 additions & 8 deletions frame/nicks/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ mod tests {
};
use sp_core::H256;
use frame_system::EnsureSignedBy;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{
Perbill, testing::Header, traits::{BlakeTwo256, IdentityLookup, BadOrigin},
};
Expand All @@ -254,9 +252,6 @@ mod tests {
pub enum Origin for Test where system = frame_system {}
}

// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;
parameter_types! {
Expand Down Expand Up @@ -324,11 +319,8 @@ mod tests {
type Balances = pallet_balances::Module<Test>;
type Nicks = Module<Test>;

// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
fn new_test_ext() -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap();
// We use default for brevity, but you can configure as desired if needed.
pallet_balances::GenesisConfig::<Test> {
balances: vec![
(1, 10),
Expand Down
5 changes: 0 additions & 5 deletions frame/recovery/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@ use frame_support::{
traits::{OnInitialize, OnFinalize},
};
use sp_core::H256;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{
Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header,
};
Expand All @@ -50,9 +48,6 @@ impl_outer_dispatch! {
}
}

// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;

Expand Down
7 changes: 0 additions & 7 deletions frame/scheduler/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -556,8 +556,6 @@ mod tests {
weights::constants::RocksDbWeight,
};
use sp_core::H256;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{
Perbill,
testing::Header,
Expand Down Expand Up @@ -638,9 +636,6 @@ mod tests {
}
}

// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;
parameter_types! {
Expand Down Expand Up @@ -699,8 +694,6 @@ mod tests {
type Logger = logger::Module<Test>;
type Scheduler = Module<Test>;

// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
pub fn new_test_ext() -> sp_io::TestExternalities {
let t = system::GenesisConfig::default().build_storage::<Test>().unwrap();
t.into()
Expand Down
8 changes: 0 additions & 8 deletions frame/scored-pool/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@ use super::*;
use std::cell::RefCell;
use frame_support::{impl_outer_origin, parameter_types, weights::Weight, ord_parameter_types};
use sp_core::H256;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{
Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header,
};
Expand All @@ -33,9 +31,6 @@ impl_outer_origin! {
pub enum Origin for Test where system = frame_system {}
}

// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;
parameter_types! {
Expand Down Expand Up @@ -133,11 +128,8 @@ impl Trait for Test {
type System = frame_system::Module<Test>;
type Balances = pallet_balances::Module<Test>;

// This function basically just builds a genesis storage key/value store according to
// our desired mockup.
pub fn new_test_ext() -> sp_io::TestExternalities {
let mut t = frame_system::GenesisConfig::default().build_storage::<Test>().unwrap();
// We use default for brevity, but you can configure as desired if needed.
pallet_balances::GenesisConfig::<Test> {
balances: vec![
(5, 500_000),
Expand Down
5 changes: 0 additions & 5 deletions frame/society/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ use frame_support::{
impl_outer_origin, parameter_types, ord_parameter_types, traits::{OnInitialize, OnFinalize}
};
use sp_core::H256;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{
Perbill,
testing::Header,
Expand All @@ -36,9 +34,6 @@ impl_outer_origin! {
pub enum Origin for Test {}
}

// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;
parameter_types! {
Expand Down
2 changes: 0 additions & 2 deletions frame/sudo/src/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ use frame_support::{
weights::Weight,
};
use sp_core::H256;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys.
use sp_runtime::{Perbill, traits::{BlakeTwo256, IdentityLookup}, testing::Header};
use sp_io;
use crate as sudo;
Expand Down
5 changes: 0 additions & 5 deletions frame/vesting/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -416,8 +416,6 @@ mod tests {
traits::Get
};
use sp_core::H256;
// The testing primitives are very useful for avoiding having to work with signatures
// or public keys. `u64` is used as the `AccountId` and no `Signature`s are required.
use sp_runtime::{
Perbill,
testing::Header,
Expand All @@ -429,9 +427,6 @@ mod tests {
pub enum Origin for Test where system = frame_system {}
}

// For testing the pallet, we construct most of a mock runtime. This means
// first constructing a configuration type (`Test`) which `impl`s each of the
// configuration traits of pallets we want to use.
#[derive(Clone, Eq, PartialEq)]
pub struct Test;
parameter_types! {
Expand Down

0 comments on commit b5280cf

Please sign in to comment.