diff options
author | HampusM <hampus@hampusmat.com> | 2023-08-02 18:40:43 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-08-02 18:40:43 +0200 |
commit | d6c0d2ba2dca9d234c5d879af364317a23370e67 (patch) | |
tree | 1f44a1fac565d662c0a6f4d6e8c991bf190e5052 | |
parent | 96d86f888652e766b74cf1b9a8e11e482802ad54 (diff) |
test: clean up DeclareDefaultFactoryMacroArgs unit tests
-rw-r--r-- | macros/src/factory/declare_default_args.rs | 23 |
1 files changed, 11 insertions, 12 deletions
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::<DeclareDefaultFactoryMacroArgs>(input_args), - Err(_) - )); + assert!(parse2::<DeclareDefaultFactoryMacroArgs>(input_args).is_err()); } #[test] fn cannot_parse_with_interface_and_duplicate_flag() { - assert!(matches!( + assert!( + // Formatting is weird without this comment parse2::<DeclareDefaultFactoryMacroArgs>(quote! { dyn IBar, async = true, threadsafe = false, async = true - }), - Err(_) - )); + }) + .is_err() + ); - assert!(matches!( + assert!( + // Formatting is weird without this comment parse2::<DeclareDefaultFactoryMacroArgs>(quote! { dyn IBar, async = true, threadsafe = false, async = false - }), - Err(_) - )); + }) + .is_err() + ); } } |