diff options
author | HampusM <hampus@hampusmat.com> | 2023-08-01 17:50:28 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2023-08-01 17:50:28 +0200 |
commit | 29df52ee4521b644ea50ce8da65032158ccb23a4 (patch) | |
tree | dbd6c522a66aa8eefea512879853a7690bce740b /macros | |
parent | 1b1cef26251539dd0948efb43b1de0b5080221d2 (diff) |
test: clean up DeclareInterfaceArgs unit tests
Diffstat (limited to 'macros')
-rw-r--r-- | macros/src/declare_interface_args.rs | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/macros/src/declare_interface_args.rs b/macros/src/declare_interface_args.rs index c924dca..cf0dbce 100644 --- a/macros/src/declare_interface_args.rs +++ b/macros/src/declare_interface_args.rs @@ -154,24 +154,26 @@ mod tests Foobar -> IFoobar, xyz = false, async = true }; - assert!(matches!(parse2::<DeclareInterfaceArgs>(input_args), Err(_))); + assert!(parse2::<DeclareInterfaceArgs>(input_args).is_err()); } #[test] fn cannot_parse_with_duplicate_flag() { - assert!(matches!( + assert!( + // Formatting is weird without this comment parse2::<DeclareInterfaceArgs>(quote! { Foobar -> IFoobar, async = true, async = true - }), - Err(_) - )); + }) + .is_err() + ); - assert!(matches!( + assert!( + // Formatting is weird without this comment parse2::<DeclareInterfaceArgs>(quote! { Foobar -> IFoobar, async = true, async = false - }), - Err(_) - )); + }) + .is_err() + ); } } |