Skip to content

Commit

Permalink
Use fully qualified #[test] attribute path
Browse files Browse the repository at this point in the history
There is no guarantee that #[test] means #[::core::prelude::v1::test],
because some other helpers (e.g. `test-log`) encourage shadowing that
attribute name for simplicity. Other test helpers (e.g. `test-log`,
`tokio-macros`) avoid ambiguity by using the full attribute path.
  • Loading branch information
alanbriolat committed Sep 27, 2022
1 parent 72d2472 commit e13772f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/test-case-macros/src/test_case.rs
Expand Up @@ -66,7 +66,7 @@ impl TestCase {
quote! { let _result = super::#item_name(#(#arg_values),*).await; },
)
} else {
attrs.insert(0, parse_quote! { #[test] });
attrs.insert(0, parse_quote! { #[::core::prelude::v1::test] });
(
TokenStream2::new(),
quote! { let _result = super::#item_name(#(#arg_values),*); },
Expand Down

0 comments on commit e13772f

Please sign in to comment.