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:
Jonas Platte 2024-09-10 21:22:02 +02:00
parent 56e56485cd
commit 7051892077
35 changed files with 22 additions and 22 deletions

View File

@ -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");
}

View File

@ -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");
}

View 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");
}

View File

@ -1,5 +1,5 @@
error: no rules expected the token `deprecated` 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, 9 | 1.1 => deprecated,
| ^^^^^^^^^^ no rules expected this token in macro call | ^^^^^^^^^^ no rules expected this token in macro call

View File

@ -1,5 +1,5 @@
error: no rules expected the token `removed` 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, 9 | 1.1 => removed,
| ^^^^^^^ no rules expected this token in macro call | ^^^^^^^ no rules expected this token in macro call

View 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");
}

View File

@ -1,13 +1,13 @@
error[E0080]: evaluation of constant value failed 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~"); 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: 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 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~"); 2 | let _ = ruma_common::session_id!("invalid~");
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^