aboutsummaryrefslogtreecommitdiff
path: root/macros/src/factory
diff options
context:
space:
mode:
authorHampusM <hampus@hampusmat.com>2023-08-01 18:00:00 +0200
committerHampusM <hampus@hampusmat.com>2023-08-01 19:54:46 +0200
commit6cf11b386c429ed8bafb053d1c2f4748b64d0f08 (patch)
treef032e63d9b484b74f41007357fa7e0bdcbd3f0cc /macros/src/factory
parentf7975f33978142461e67f5ebb2e478aa89c42d21 (diff)
test: clean up FactoryMacroArgs unit tests
Diffstat (limited to 'macros/src/factory')
-rw-r--r--macros/src/factory/macro_args.rs20
1 files changed, 11 insertions, 9 deletions
diff --git a/macros/src/factory/macro_args.rs b/macros/src/factory/macro_args.rs
index 64d6e12..8acbdb6 100644
--- a/macros/src/factory/macro_args.rs
+++ b/macros/src/factory/macro_args.rs
@@ -107,24 +107,26 @@ mod tests
async = true, threadsafe = false, foo = true
};
- assert!(matches!(parse2::<FactoryMacroArgs>(input_args), Err(_)));
+ assert!(parse2::<FactoryMacroArgs>(input_args).is_err());
}
#[test]
fn cannot_parse_with_duplicate_flag()
{
- assert!(matches!(
+ assert!(
+ // Formatting is weird without this comment
parse2::<FactoryMacroArgs>(quote! {
async = true, threadsafe = false, async = true
- }),
- Err(_)
- ));
+ })
+ .is_err()
+ );
- assert!(matches!(
+ assert!(
+ // Formatting is weird without this comment
parse2::<FactoryMacroArgs>(quote! {
async = true, threadsafe = false, async = false
- }),
- Err(_)
- ));
+ })
+ .is_err()
+ );
}
}