fix some failing ui tests (#9157)

* fix some failing ui tests

* Update frame/support/test/tests/pallet_ui/call_argument_invalid_bound_2.stderr

* Update frame/support/test/tests/pallet_ui/call_argument_invalid_bound_2.stderr

* fix ui test

* fix ui test

* TRYBUILD=overwrite cargo test --workspace -- ui

Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com>
Co-authored-by: thiolliere <gui.thiolliere@gmail.com>
This commit is contained in:
Peter Goodspeed-Niklaus
2021-06-21 15:12:58 +02:00
committed by GitHub
parent e5831c3db3
commit 46ccf17e7c
9 changed files with 142 additions and 96 deletions
@@ -5,7 +5,10 @@ error[E0053]: method `test` has an incompatible type for trait
| --- type in trait
...
19 | fn test(data: String) {}
| ^^^^^^ expected `u64`, found struct `std::string::String`
| ^^^^^^
| |
| expected `u64`, found struct `std::string::String`
| help: change the parameter type to match the trait: `u64`
|
= note: expected fn pointer `fn(u64)`
found fn pointer `fn(std::string::String)`
@@ -21,7 +24,17 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
| |_- type in trait
16 |
17 | sp_api::impl_runtime_apis! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found struct `std::string::String`
| -^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| _expected `u64`, found struct `std::string::String`
| |
18 | | impl self::Api<Block> for Runtime {
19 | | fn test(data: String) {}
20 | | }
... |
32 | | }
33 | | }
| |_- help: change the parameter type to match the trait: `std::option::Option<u64>`
|
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> Result<_, _>`
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<std::string::String>, Vec<_>) -> Result<_, _>`
@@ -22,7 +22,17 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
| |_- type in trait
...
12 | sp_api::mock_impl_runtime_apis! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `()`
| -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| _expected `u64`, found `()`
| |
13 | | impl Api<Block> for MockApi {
14 | | fn test(self, data: u64) {}
15 | |
16 | | fn test2(&mut self, data: u64) {}
17 | | }
18 | | }
| |_- help: change the parameter type to match the trait: `Option<u64>`
|
= note: expected fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<u64>, Vec<_>) -> Result<_, _>`
found fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<()>, Vec<_>) -> Result<_, _>`
@@ -40,7 +50,17 @@ error[E0053]: method `Api_test2_runtime_api_impl` has an incompatible type for t
| |_- type in trait
...
12 | sp_api::mock_impl_runtime_apis! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `()`
| -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| _expected `u64`, found `()`
| |
13 | | impl Api<Block> for MockApi {
14 | | fn test(self, data: u64) {}
15 | |
16 | | fn test2(&mut self, data: u64) {}
17 | | }
18 | | }
| |_- help: change the parameter type to match the trait: `Option<u64>`
|
= note: expected fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<u64>, Vec<_>) -> Result<_, _>`
found fn pointer `fn(&MockApi, &BlockId<sp_runtime::generic::block::Block<sp_runtime::generic::header::Header<u64, sp_runtime::traits::BlakeTwo256>, Extrinsic>>, ExecutionContext, Option<()>, Vec<_>) -> Result<_, _>`
@@ -5,7 +5,10 @@ error[E0053]: method `test` has an incompatible type for trait
| --- type in trait
...
19 | fn test(data: &u64) {
| ^^^^ expected `u64`, found `&u64`
| ^^^^
| |
| expected `u64`, found `&u64`
| help: change the parameter type to match the trait: `u64`
|
= note: expected fn pointer `fn(u64)`
found fn pointer `fn(&u64)`
@@ -21,7 +24,17 @@ error[E0053]: method `Api_test_runtime_api_impl` has an incompatible type for tr
| |_- type in trait
16 |
17 | sp_api::impl_runtime_apis! {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u64`, found `&u64`
| -^^^^^^^^^^^^^^^^^^^^^^^^^
| |
| _expected `u64`, found `&u64`
| |
18 | | impl self::Api<Block> for Runtime {
19 | | fn test(data: &u64) {
20 | | unimplemented!()
... |
34 | | }
35 | | }
| |_- help: change the parameter type to match the trait: `std::option::Option<u64>`
|
= note: expected fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<u64>, Vec<_>) -> Result<_, _>`
found fn pointer `fn(&RuntimeApiImpl<__SR_API_BLOCK__, RuntimeApiImplCall>, &BlockId<__SR_API_BLOCK__>, ExecutionContext, std::option::Option<&u64>, Vec<_>) -> Result<_, _>`