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

[test] add derive macro tests #514

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

r3stl355
Copy link
Contributor

What changes are proposed in this pull request?

A simplified version of PR429 (to be closed/abandoned) using a doctest trick.

  • I had to make a small change to the macro code itself, changing crate:: todelta_kernel:: in the generated code.
  • Used existing developer-visibility feature instead of adding a new one as it seemed to fit the purpose
  • Added an extra command to justfile to run the new tests as part of existing testing process

How was this change tested?

All tests pass, including the newly added

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.31%. Comparing base (d146b80) to head (f1c068d).
Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #514   +/-   ##
=======================================
  Coverage   80.31%   80.31%           
=======================================
  Files          62       62           
  Lines       13541    13541           
  Branches    13541    13541           
=======================================
  Hits        10876    10876           
  Misses       2106     2106           
  Partials      559      559           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

kernel/src/lib.rs Show resolved Hide resolved
kernel/src/lib.rs Outdated Show resolved Hide resolved
kernel/src/lib.rs Show resolved Hide resolved
kernel/src/lib.rs Show resolved Hide resolved
justfile Show resolved Hide resolved
kernel/src/lib.rs Show resolved Hide resolved
kernel/src/lib.rs Show resolved Hide resolved
Copy link
Collaborator

@scovich scovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

kernel/src/lib.rs Outdated Show resolved Hide resolved
derive-macros/src/lib.rs Show resolved Hide resolved
Copy link
Collaborator

@zachschuermann zachschuermann left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

left a few questions!

derive-macros/src/lib.rs Show resolved Hide resolved
kernel/src/lib.rs Show resolved Hide resolved
kernel/src/actions/mod.rs Show resolved Hide resolved
kernel/src/lib.rs Outdated Show resolved Hide resolved
@zachschuermann zachschuermann changed the title [chore] add derive macro tests [test] add derive macro tests Nov 25, 2024
…with both single and multi-part paths

Signed-off-by: Niko <[email protected]>
@r3stl355
Copy link
Contributor Author

I added a second part that fixes an error in macro when fully-qulified multi-part types are used (forgot to push this earlier). Also added a passing docs test to verify, this test needs to be moved to normal test as part of #526

Copy link
Collaborator

@scovich scovich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks!

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