Skip to content
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

Conversation

WilliamVenner
Copy link
Contributor

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.

@WilliamVenner WilliamVenner requested a review from a team as a code owner December 15, 2022 14:04
@cpiemontese cpiemontese requested review from Fs00 and cpiemontese and removed request for cpiemontese December 15, 2022 15:23
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",
Copy link
Contributor

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?

Copy link
Contributor Author

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 😁

@cpiemontese
Copy link
Contributor

I like the overall refactor 😄

MaeIsBad
MaeIsBad previously approved these changes Dec 19, 2022
Copy link
Member

@MaeIsBad MaeIsBad left a 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

@WilliamVenner WilliamVenner force-pushed the PLATFORM-863/user-story/improve-code-coverage-test-for-error-messages-in-veil branch from 67fe5af to 628b654 Compare December 20, 2022 10:46
@WilliamVenner
Copy link
Contributor Author

@MaeIsBad Had to rebase D:

@WilliamVenner WilliamVenner merged commit d0e22f9 into master Dec 20, 2022
@WilliamVenner WilliamVenner deleted the PLATFORM-863/user-story/improve-code-coverage-test-for-error-messages-in-veil branch December 20, 2022 10:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants