Skip to content

Add test to verify re-exported auxiliary types #202

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

Closed

Conversation

GideonBature
Copy link
Contributor

@GideonBature GideonBature commented May 24, 2025

In order to address the issue in #137 to ensure that re-exported types auxiliary types are correct, I simply added a standalone test file where I defined a macro to assert that fields of re-exported types are of the expected auxiliary types.

This is still a WIP, still need to know if doing something like this aligns with the project and if I am on the right course before I continue...

@tcharding
Copy link
Member

To review this I asked myself:

  1. What are we trying to prove?
  2. What does the integration_test/tests/aux_export.rs file prove
  3. How do I know we didn't miss any of the auxiliary types?
  4. When we add a newtype that has an auxiliary type what will stop us from forgetting to test it i.e., does this new file add any protection against forgetting?

If you ask your self these questions perhaps you can come up with the same review I would give?

@GideonBature
Copy link
Contributor Author

To review this I asked myself:

  1. What are we trying to prove?
  2. What does the integration_test/tests/aux_export.rs file prove
  3. How do I know we didn't miss any of the auxiliary types?
  4. When we add a newtype that has an auxiliary type what will stop us from forgetting to test it i.e., does this new file add any protection against forgetting?

If you ask your self these questions perhaps you can come up with the same review I would give?

I see, thank you for these questions, I will look into 3 and 4 and come up with a better solution.

@GideonBature GideonBature marked this pull request as draft May 28, 2025 22:32
@GideonBature GideonBature deleted the auxiliary_types branch May 31, 2025 08:09
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.

2 participants