From 070148e9fd6a98b67defc7895042f5aef018bd79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20K=C3=B6cher?= <bkchr@users.noreply.github.com> Date: Sat, 11 Jan 2020 18:23:04 +0100 Subject: [PATCH] Add test files I forgot to commit with #4520 (#4598) --- .../default_module_invalid_arg.rs | 14 ++++++++++++++ .../default_module_invalid_arg.stderr | 5 +++++ .../construct_runtime_ui/invalid_module_entry.rs | 14 ++++++++++++++ .../invalid_module_entry.stderr | 5 +++++ 4 files changed, 38 insertions(+) create mode 100644 substrate/frame/support/test/tests/construct_runtime_ui/default_module_invalid_arg.rs create mode 100644 substrate/frame/support/test/tests/construct_runtime_ui/default_module_invalid_arg.stderr create mode 100644 substrate/frame/support/test/tests/construct_runtime_ui/invalid_module_entry.rs create mode 100644 substrate/frame/support/test/tests/construct_runtime_ui/invalid_module_entry.stderr diff --git a/substrate/frame/support/test/tests/construct_runtime_ui/default_module_invalid_arg.rs b/substrate/frame/support/test/tests/construct_runtime_ui/default_module_invalid_arg.rs new file mode 100644 index 00000000000..92a5ffff73f --- /dev/null +++ b/substrate/frame/support/test/tests/construct_runtime_ui/default_module_invalid_arg.rs @@ -0,0 +1,14 @@ +use frame_support::construct_runtime; + +construct_runtime! { + pub enum Runtime where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic + { + System: system, + Balance: balances::{default, Error}, + } +} + +fn main() {} diff --git a/substrate/frame/support/test/tests/construct_runtime_ui/default_module_invalid_arg.stderr b/substrate/frame/support/test/tests/construct_runtime_ui/default_module_invalid_arg.stderr new file mode 100644 index 00000000000..d4a46a34910 --- /dev/null +++ b/substrate/frame/support/test/tests/construct_runtime_ui/default_module_invalid_arg.stderr @@ -0,0 +1,5 @@ +error: Only the following modules are allowed: `Module`, `Call`, `Storage`, `Event`, `Config`, `Origin`, `Inherent`, `ValidateUnsigned` + --> $DIR/default_module_invalid_arg.rs:10:32 + | +10 | Balance: balances::{default, Error}, + | ^^^^^ diff --git a/substrate/frame/support/test/tests/construct_runtime_ui/invalid_module_entry.rs b/substrate/frame/support/test/tests/construct_runtime_ui/invalid_module_entry.rs new file mode 100644 index 00000000000..db1250cdf4d --- /dev/null +++ b/substrate/frame/support/test/tests/construct_runtime_ui/invalid_module_entry.rs @@ -0,0 +1,14 @@ +use frame_support::construct_runtime; + +construct_runtime! { + pub enum Runtime where + Block = Block, + NodeBlock = Block, + UncheckedExtrinsic = UncheckedExtrinsic + { + System: system, + Balance: balances::{Error}, + } +} + +fn main() {} diff --git a/substrate/frame/support/test/tests/construct_runtime_ui/invalid_module_entry.stderr b/substrate/frame/support/test/tests/construct_runtime_ui/invalid_module_entry.stderr new file mode 100644 index 00000000000..da38a82d7e2 --- /dev/null +++ b/substrate/frame/support/test/tests/construct_runtime_ui/invalid_module_entry.stderr @@ -0,0 +1,5 @@ +error: Only the following modules are allowed: `Module`, `Call`, `Storage`, `Event`, `Config`, `Origin`, `Inherent`, `ValidateUnsigned` + --> $DIR/invalid_module_entry.rs:10:23 + | +10 | Balance: balances::{Error}, + | ^^^^^ -- GitLab