aboutsummaryrefslogtreecommitdiff
path: root/macros/src/declare_interface_args.rs
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-09-26 19:46:15 +0200
committerHampusM <hampus@hampusmat.com>2023-09-26 19:46:15 +0200
commitfe4255d765d24b3a62094a02d35077a1022887bb (patch)
treeee47f81339f569ec3b42d56778c9be514cb80ae4 /macros/src/declare_interface_args.rs
parent267ab1dc45c7e2cb68d8238c04376a258dcf61c9 (diff)
test: make unit tests not return Result
Diffstat (limited to 'macros/src/declare_interface_args.rs')
-rw-r--r--macros/src/declare_interface_args.rs14
1 files changed, 4 insertions, 10 deletions
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<dyn Error>>
+ fn can_parse_with_no_flags()
{
let input_args = quote! {
Foo -> IFoo
};
- let decl_interface_args = parse2::<DeclareInterfaceArgs>(input_args)?;
+ let decl_interface_args = parse2::<DeclareInterfaceArgs>(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<dyn Error>>
+ fn can_parse_with_flags()
{
let input_args = quote! {
Foobar -> IFoobar, threadsafe_sharable = true
};
- let decl_interface_args = parse2::<DeclareInterfaceArgs>(input_args)?;
+ let decl_interface_args = parse2::<DeclareInterfaceArgs>(input_args).unwrap();
assert_eq!(
decl_interface_args.implementation,
@@ -147,8 +143,6 @@ mod tests
)))
}])
);
-
- Ok(())
}
#[test]