Skip to content

Commit

Permalink
Test larger expr depth
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Jan 1, 2025
1 parent 8b162d4 commit bd02f07
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/test_expr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,6 @@ fn test_permutations() -> ExitCode {
}
}

let mut count = 0;
let mut failures = 0;
macro_rules! fail {
($($message:tt)*) => {{
Expand All @@ -1587,7 +1586,6 @@ fn test_permutations() -> ExitCode {
}};
}
let mut assert = |mut original: Expr| {
count += 1;
let tokens = original.to_token_stream();
let Ok(mut parsed) = syn::parse2::<Expr>(tokens.clone()) else {
fail!(
Expand Down Expand Up @@ -1619,8 +1617,7 @@ fn test_permutations() -> ExitCode {
}
};

iter(2, &mut assert);
assert_eq!(count, 505);
iter(4, &mut assert);
if failures > 0 {
eprintln!("FAILURES: {failures}");
ExitCode::FAILURE
Expand Down

0 comments on commit bd02f07

Please sign in to comment.