#[test]
pub fn test_snapshots() {
let pwd = std::env::current_dir().unwrap();
let pwd = pwd.to_str().unwrap();
macrotest::expand_args(
"tests/expand/*.rs",
[
"--tests".to_string(),
"--config".to_string(),
format!("build.rustflags=[\"--remap-path-prefix={pwd}=.\"]"),
],
);
}
mod expand {
mod async_tests;
#[expect(
dead_code,
reason = "since #[test] is missing, the function should lead to a dead code warning, \
like normal test functions which you forgot to annotate with #[test]"
)]
mod missing_test_attr;
mod no_subtests;
mod rstest_tests;
mod two_subtests;
}