From e749a2031eec6a85d99321160f7919949faebfbe Mon Sep 17 00:00:00 2001 From: David Tolnay Date: Sat, 28 Dec 2024 18:33:10 -0800 Subject: [PATCH] Count total number of generated expressions in permutations test --- tests/test_expr.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_expr.rs b/tests/test_expr.rs index 46fc94cbf3..053c93881e 100644 --- a/tests/test_expr.rs +++ b/tests/test_expr.rs @@ -1180,6 +1180,7 @@ fn test_permutations() -> ExitCode { }); } + let mut count = 0; let mut status = ExitCode::SUCCESS; macro_rules! fail { ($($message:tt)*) => {{ @@ -1189,6 +1190,7 @@ fn test_permutations() -> ExitCode { }}; } let mut assert = |expr: Expr| { + count += 1; let tokens = expr.to_token_stream(); if syn::parse2::(tokens.clone()).is_err() { fail!("failed to parse: {}", tokens); @@ -1196,5 +1198,6 @@ fn test_permutations() -> ExitCode { }; iter(2, &mut assert); + assert_eq!(count, 134599); status }