From d6c0d2ba2dca9d234c5d879af364317a23370e67 Mon Sep 17 00:00:00 2001 From: HampusM Date: Wed, 2 Aug 2023 18:40:43 +0200 Subject: test: clean up DeclareDefaultFactoryMacroArgs unit tests --- macros/src/factory/declare_default_args.rs | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'macros/src') diff --git a/macros/src/factory/declare_default_args.rs b/macros/src/factory/declare_default_args.rs index 46185e3..269ef8f 100644 --- a/macros/src/factory/declare_default_args.rs +++ b/macros/src/factory/declare_default_args.rs @@ -202,27 +202,26 @@ mod tests dyn IBar, async = true, foo = false }; - assert!(matches!( - parse2::(input_args), - Err(_) - )); + assert!(parse2::(input_args).is_err()); } #[test] fn cannot_parse_with_interface_and_duplicate_flag() { - assert!(matches!( + assert!( + // Formatting is weird without this comment parse2::(quote! { dyn IBar, async = true, threadsafe = false, async = true - }), - Err(_) - )); + }) + .is_err() + ); - assert!(matches!( + assert!( + // Formatting is weird without this comment parse2::(quote! { dyn IBar, async = true, threadsafe = false, async = false - }), - Err(_) - )); + }) + .is_err() + ); } } -- cgit v1.2.3-18-g5258