mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-23 06:08:01 +00:00
Validate absolute path for substitute_type (#577)
* Remove commented code Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Ensure substitue path is global absolute Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Absolute path for build.rs Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io> * Add ui test that fails to compile Signed-off-by: Alexandru Vasile <alexandru.vasile@parity.io>
This commit is contained in:
@@ -15,6 +15,14 @@
|
||||
// along with subxt. If not, see <http://www.gnu.org/licenses/>.
|
||||
#![cfg(test)]
|
||||
|
||||
//! UI test set uses [`trybuild`](https://docs.rs/trybuild/latest/trybuild/index.html) to
|
||||
//! check whether expected valid examples of code compile correctly, and for incorrect ones
|
||||
//! errors are helpful and valid (e.g. have correct spans).
|
||||
//!
|
||||
//!
|
||||
//! Use with `TRYBUILD=overwrite` after updating codebase (see `trybuild` docs for more details on that)
|
||||
//! to automatically regenerate `stderr` files, but don't forget to check that new files make sense.
|
||||
|
||||
mod dispatch_errors;
|
||||
mod storage;
|
||||
mod utils;
|
||||
@@ -49,3 +57,9 @@ fn ui_tests() {
|
||||
dispatch_errors::metadata_array_dispatch_error(),
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn ui_fail() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.compile_fail("src/incorrect/*.rs");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user