Rollup merge of #131576 - Zalathar:tests-tests, r=jieyouxu

Flatten redundant test module `run_make_support::diff::tests::tests`

This module is already named `tests`, and is already gated by `#[cfg(test)]`, so there's no need for it to also contain `mod tests`.

r? jieyouxu
This commit is contained in:
Trevor Gross 2024-10-11 23:57:48 -04:00 committed by GitHub
commit 5e477c9107
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1,6 +1,4 @@
#[cfg(test)]
mod tests {
use crate::*;
use crate::diff;
#[test]
fn test_diff() {
@ -15,10 +13,7 @@ mod tests {
let actual = "foo\nbaz\nbar\n";
let output = std::panic::catch_unwind(|| {
diff()
.expected_text("EXPECTED_TEXT", expected)
.actual_text("ACTUAL_TEXT", actual)
.run();
diff().expected_text("EXPECTED_TEXT", expected).actual_text("ACTUAL_TEXT", actual).run();
})
.unwrap_err();
@ -58,4 +53,3 @@ test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; fini
.normalize(r#"finished in \d+\.\d+s"#, "finished in $$TIME")
.run();
}
}