From fe4255d765d24b3a62094a02d35077a1022887bb Mon Sep 17 00:00:00 2001 From: HampusM Date: Tue, 26 Sep 2023 19:46:15 +0200 Subject: test: make unit tests not return Result --- macros/src/declare_interface_args.rs | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'macros/src/declare_interface_args.rs') diff --git a/macros/src/declare_interface_args.rs b/macros/src/declare_interface_args.rs index fea6c7b..6556153 100644 --- a/macros/src/declare_interface_args.rs +++ b/macros/src/declare_interface_args.rs @@ -60,8 +60,6 @@ impl Parse for DeclareInterfaceArgs #[cfg(test)] mod tests { - use std::error::Error; - use proc_macro2::Span; use quote::{format_ident, quote}; use syn::{parse2, Lit, LitBool}; @@ -71,13 +69,13 @@ mod tests use crate::test_utils; #[test] - fn can_parse_with_no_flags() -> Result<(), Box> + fn can_parse_with_no_flags() { let input_args = quote! { Foo -> IFoo }; - let decl_interface_args = parse2::(input_args)?; + let decl_interface_args = parse2::(input_args).unwrap(); assert_eq!( decl_interface_args.implementation, @@ -102,18 +100,16 @@ mod tests ); assert!(decl_interface_args.flags.is_empty()); - - Ok(()) } #[test] - fn can_parse_with_flags() -> Result<(), Box> + fn can_parse_with_flags() { let input_args = quote! { Foobar -> IFoobar, threadsafe_sharable = true }; - let decl_interface_args = parse2::(input_args)?; + let decl_interface_args = parse2::(input_args).unwrap(); assert_eq!( decl_interface_args.implementation, @@ -147,8 +143,6 @@ mod tests ))) }]) ); - - Ok(()) } #[test] -- cgit v1.2.3-18-g5258