Skip to content

verify: Test that re-exported types auxiliary types are correct #137

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

Open
tcharding opened this issue Apr 30, 2025 · 2 comments
Open

verify: Test that re-exported types auxiliary types are correct #137

tcharding opened this issue Apr 30, 2025 · 2 comments

Comments

@tcharding
Copy link
Member

Given RPC method foobar returning type FooBar with conversion error FooBarError.

Our integration testing strategy verifies that FooBar is re-exported correctly. If FooBar has a field with type FooBarAuxType then we do not currently verify that it is correctly re-exported - i would be nice to come up with a way to prove we got it right. Extremely high chance I made mistakes in this area. Not super likely downstream will notice.

@GideonBature
Copy link
Contributor

One way I am thinking is to also use the explicit type check we are using for the normal types. But it might make the test clumsy. To avoid this, I am thinking of creating another test file to check that all re-exports is done correctly including the Auxiliary types.

Another way I am looking at is to use a custom macro method of assert_field_is_exact_type!, which we can define and then call for each re-exported types having auxiliary types.

@tcharding
Copy link
Member Author

Go for it, happy to review what you come up with.

@tcharding tcharding changed the title Test that re-exported types auxiliary types are correct verify: Test that re-exported types auxiliary types are correct May 12, 2025
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

No branches or pull requests

2 participants