-
Notifications
You must be signed in to change notification settings - Fork 3
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
[PLATFORM-863]: Improve code coverage test for error messages in Veil #62
[PLATFORM-863]: Improve code coverage test for error messages in Veil #62
Conversation
veil-macros/src/redact.rs
Outdated
if unused.should_throw_err() { | ||
return Err(syn::Error::new( | ||
item_span, | ||
"`#[derive(Redact)]` does nothing by default, you must specify at least one field to redact. You should `#[derive(Debug)]` instead if this is intentional", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't seem to be tested, or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's tested in redact_unused.rs
😁
I like the overall refactor 😄 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More tests are always nice to have
67fe5af
to
628b654
Compare
@MaeIsBad Had to rebase D: |
https://prima-assicurazioni-spa.myjetbrains.com/youtrack/issue/PLATFORM-863
This PR introduces a change to the code coverage test for error messages that catches a instances of syn::Error::new_spanned.
I have also added the missing tests to improve the said code coverage.