mirror of
https://github.com/matrix-org/matrix-rust-sdk.git
synced 2026-05-04 05:58:11 -04:00
refactor(test)!: More debugging info on errors in async_test macro
This commit is contained in:
@@ -38,13 +38,15 @@ pub fn async_test(_attr: TokenStream, item: TokenStream) -> TokenStream {
|
||||
let fn_call: TokenStream = if fun.sig.asyncness.is_some() {
|
||||
quote! {
|
||||
{
|
||||
assert!(#fn_name().await.is_ok());
|
||||
let res = #fn_name().await;
|
||||
assert!(res.is_ok(), "{:?}", res);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
quote! {
|
||||
{
|
||||
assert!(#fn_name().is_ok());
|
||||
let res = #fn_name();
|
||||
assert!(res.is_ok(), "{:?}", res);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user