From 29df52ee4521b644ea50ce8da65032158ccb23a4 Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 1 Aug 2023 17:50:28 +0200 Subject: test: clean up DeclareInterfaceArgs unit tests --- macros/src/declare_interface_args.rs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'macros') 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::(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! { Foobar -> IFoobar, async = true, async = true - }), - Err(_) - )); + }) + .is_err() + ); - assert!(matches!( + assert!( + // Formatting is weird without this comment parse2::(quote! { Foobar -> IFoobar, async = true, async = false - }), - Err(_) - )); + }) + .is_err() + ); } } -- cgit v1.2.3-18-g5258