You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
verify: Test that re-exported types auxiliary types are correct #137
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.
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.
changed the title [-]Test that re-exported `types` auxiliary types are correct[/-][+]verify: Test that re-exported `types` auxiliary types are correct[/+]on May 12, 2025
Activity
GideonBature commentedon May 6, 2025
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 commentedon May 8, 2025
Go for it, happy to review what you come up with.
[-]Test that re-exported `types` auxiliary types are correct[/-][+]verify: Test that re-exported `types` auxiliary types are correct[/+]Merge rust-bitcoin#420: verify: Add a check that re-exports in `types…