forked from paritytech/substrate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Oliver Tale-Yazdi <oliver.tale-yazdi@parity.io>
- Loading branch information
Showing
6 changed files
with
74 additions
and
0 deletions.
There are no files selected for viewing
18 changes: 18 additions & 0 deletions
18
frame/support/test/tests/pallet_ui/storage_invalid_pov_estimate.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#[frame_support::pallet] | ||
mod pallet { | ||
use frame_support::pallet_prelude::Hooks; | ||
use frame_system::pallet_prelude::BlockNumberFor; | ||
|
||
#[pallet::config] | ||
pub trait Config: frame_system::Config {} | ||
|
||
#[pallet::pallet] | ||
pub struct Pallet<T>(core::marker::PhantomData<T>); | ||
|
||
#[pallet::storage] | ||
#[pallet::pov_estimate = Wrong] | ||
type Foo<T> = StorageValue<_, u8>; | ||
} | ||
|
||
fn main() { | ||
} |
5 changes: 5 additions & 0 deletions
5
frame/support/test/tests/pallet_ui/storage_invalid_pov_estimate.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: Invalid value for the proof_size attribute: Error("expected `MaxEncodedLen` or `Measured`") | ||
--> tests/pallet_ui/storage_invalid_pov_estimate.rs:13:3 | ||
| | ||
13 | #[pallet::pov_estimate = Wrong] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
21 changes: 21 additions & 0 deletions
21
frame/support/test/tests/pallet_ui/storage_multiple_pov_estimate.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#[frame_support::pallet] | ||
mod pallet { | ||
use frame_support::pallet_prelude::*; | ||
|
||
#[pallet::config] | ||
pub trait Config: frame_system::Config {} | ||
|
||
#[pallet::pallet] | ||
pub struct Pallet<T>(_); | ||
|
||
#[pallet::error] | ||
pub enum Error<T> {} | ||
|
||
#[pallet::storage] | ||
#[pallet::pov_estimate = MaxEncodedLen] | ||
#[pallet::pov_estimate = MaxEncodedLen] | ||
type Foo<T: Config> = StorageValue<_, u8>; | ||
} | ||
|
||
fn main() { | ||
} |
5 changes: 5 additions & 0 deletions
5
frame/support/test/tests/pallet_ui/storage_multiple_pov_estimate.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: Invalid attribute: Duplicate attribute | ||
--> tests/pallet_ui/storage_multiple_pov_estimate.rs:16:3 | ||
| | ||
16 | #[pallet::pov_estimate = MaxEncodedLen] | ||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
20 changes: 20 additions & 0 deletions
20
frame/support/test/tests/pallet_ui/storage_pov_estimate_on_pallet.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#[frame_support::pallet] | ||
mod pallet { | ||
use frame_support::pallet_prelude::*; | ||
|
||
#[pallet::config] | ||
pub trait Config: frame_system::Config {} | ||
|
||
#[pallet::pallet] | ||
#[pallet::pov_estimate = MaxEncodedLen] | ||
pub struct Pallet<T>(_); | ||
|
||
#[pallet::error] | ||
pub enum Error<T> {} | ||
|
||
#[pallet::storage] | ||
type Foo<T: Config> = StorageValue<_, u8>; | ||
} | ||
|
||
fn main() { | ||
} |
5 changes: 5 additions & 0 deletions
5
frame/support/test/tests/pallet_ui/storage_pov_estimate_on_pallet.stderr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
error: expected one of: `generate_store`, `without_storage_info`, `storage_version` | ||
--> tests/pallet_ui/storage_pov_estimate_on_pallet.rs:9:12 | ||
| | ||
9 | #[pallet::pov_estimate = MaxEncodedLen] | ||
| ^^^^^^^^^^^^ |