From 6cf11b386c429ed8bafb053d1c2f4748b64d0f08 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 1 Aug 2023 18:00:00 +0200 Subject: test: clean up FactoryMacroArgs unit tests --- macros/src/factory/macro_args.rs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'macros/src') diff --git a/macros/src/factory/macro_args.rs b/macros/src/factory/macro_args.rs index 64d6e12..8acbdb6 100644 --- a/macros/src/factory/macro_args.rs +++ b/macros/src/factory/macro_args.rs @@ -107,24 +107,26 @@ mod tests async = true, threadsafe = false, foo = true }; - assert!(matches!(parse2::(input_args), Err(_))); + assert!(parse2::(input_args).is_err()); } #[test] fn cannot_parse_with_duplicate_flag() { - assert!(matches!( + assert!( + // Formatting is weird without this comment parse2::(quote! { async = true, threadsafe = false, async = true - }), - Err(_) - )); + }) + .is_err() + ); - assert!(matches!( + assert!( + // Formatting is weird without this comment parse2::(quote! { async = true, threadsafe = false, async = false - }), - Err(_) - )); + }) + .is_err() + ); } } -- cgit v1.2.3-18-g5258