-
-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
defmt-test: support the #[ignore] attribute & raise error on unknown attributes #381
Labels
type: enhancement
Enhancement or feature request
Comments
I did |
japaric
added
type: enhancement
Enhancement or feature request
type: bug
Something isn't working
labels
Feb 10, 2021
This doesn't work either: #[cfg(ignore)]
#[test]
fn loopback() { /* .. */ } in the sense that the test is compiled and executed when |
bors bot
added a commit
that referenced
this issue
Feb 10, 2021
383: defmt-test: Modify attributes in place and handle #[cfg] r=japaric a=jonas-schievink Closes (?) #381 (but doesn't add `#[ignore]` support) This changes the defmt-test macro to retain the `ItemFn`s and selectively delete defmt-test-specific attributes from them. The result is that the code is now simpler and arbitrary Rust attributes can be attached to tests. Doing so with `#[ignore]` gives the expected "unused attribute" warning. Co-authored-by: Jonas Schievink <jonasschievink@gmail.com>
This now behaves as expected, do we want to close it, or leave it open to track |
I'll open a new issue about the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The standard test runner uses this attribute to ignore (omit running) a unit test. We implement the same functionality or, at least, error when an unknown attribute is used within
defmt_test::tests
because right nowcargo test
-ing this:does run the test marked as
#[ignore]
The text was updated successfully, but these errors were encountered: