Move integration tests one directory level deeper
… and rename from tests to it (integration tests). This allows enabling the mod_module_files lint everywhere again.
This commit is contained in:
parent
56e56485cd
commit
7051892077
@ -1,10 +0,0 @@
|
||||
#[test]
|
||||
fn ui() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.pass("tests/api/ui/api-sanity-check.rs");
|
||||
t.pass("tests/api/ui/move-value.rs");
|
||||
t.pass("tests/api/ui/request-only.rs");
|
||||
t.pass("tests/api/ui/response-only.rs");
|
||||
t.compile_fail("tests/api/ui/deprecated-without-added.rs");
|
||||
t.compile_fail("tests/api/ui/removed-without-deprecated.rs");
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
#[test]
|
||||
fn ui() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.pass("tests/identifiers/ui/01-valid-id-macros.rs");
|
||||
t.compile_fail("tests/identifiers/ui/02-invalid-id-macros.rs");
|
||||
t.compile_fail("tests/identifiers/ui/03-invalid-new-id-macros.rs");
|
||||
}
|
10
crates/ruma-common/tests/it/api/ruma_api.rs
Normal file
10
crates/ruma-common/tests/it/api/ruma_api.rs
Normal file
@ -0,0 +1,10 @@
|
||||
#[test]
|
||||
fn ui() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.pass("tests/it/api/ui/api-sanity-check.rs");
|
||||
t.pass("tests/it/api/ui/move-value.rs");
|
||||
t.pass("tests/it/api/ui/request-only.rs");
|
||||
t.pass("tests/it/api/ui/response-only.rs");
|
||||
t.compile_fail("tests/it/api/ui/deprecated-without-added.rs");
|
||||
t.compile_fail("tests/it/api/ui/removed-without-deprecated.rs");
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
error: no rules expected the token `deprecated`
|
||||
--> tests/api/ui/deprecated-without-added.rs:9:16
|
||||
--> tests/it/api/ui/deprecated-without-added.rs:9:16
|
||||
|
|
||||
9 | 1.1 => deprecated,
|
||||
| ^^^^^^^^^^ no rules expected this token in macro call
|
@ -1,5 +1,5 @@
|
||||
error: no rules expected the token `removed`
|
||||
--> tests/api/ui/removed-without-deprecated.rs:9:16
|
||||
--> tests/it/api/ui/removed-without-deprecated.rs:9:16
|
||||
|
|
||||
9 | 1.1 => removed,
|
||||
| ^^^^^^^ no rules expected this token in macro call
|
7
crates/ruma-common/tests/it/identifiers/id_macros.rs
Normal file
7
crates/ruma-common/tests/it/identifiers/id_macros.rs
Normal file
@ -0,0 +1,7 @@
|
||||
#[test]
|
||||
fn ui() {
|
||||
let t = trybuild::TestCases::new();
|
||||
t.pass("tests/it/identifiers/ui/01-valid-id-macros.rs");
|
||||
t.compile_fail("tests/it/identifiers/ui/02-invalid-id-macros.rs");
|
||||
t.compile_fail("tests/it/identifiers/ui/03-invalid-new-id-macros.rs");
|
||||
}
|
@ -1,13 +1,13 @@
|
||||
error[E0080]: evaluation of constant value failed
|
||||
--> tests/identifiers/ui/03-invalid-new-id-macros.rs:2:13
|
||||
--> tests/it/identifiers/ui/03-invalid-new-id-macros.rs:2:13
|
||||
|
|
||||
2 | let _ = ruma_common::session_id!("invalid~");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'Invalid Session ID: contains invalid characters', $DIR/tests/identifiers/ui/03-invalid-new-id-macros.rs:2:13
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the evaluated program panicked at 'Invalid Session ID: contains invalid characters', $DIR/tests/it/identifiers/ui/03-invalid-new-id-macros.rs:2:13
|
||||
|
|
||||
= note: this error originates in the macro `$crate::panic::panic_2021` which comes from the expansion of the macro `ruma_common::session_id` (in Nightly builds, run with -Z macro-backtrace for more info)
|
||||
|
||||
note: erroneous constant encountered
|
||||
--> tests/identifiers/ui/03-invalid-new-id-macros.rs:2:13
|
||||
--> tests/it/identifiers/ui/03-invalid-new-id-macros.rs:2:13
|
||||
|
|
||||
2 | let _ = ruma_common::session_id!("invalid~");
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
Loading…
x
Reference in New Issue
Block a user