reth icon indicating copy to clipboard operation
reth copied to clipboard

Extract test generation from derive macros

Open klkvr opened this issue 1 year ago • 0 comments

#[derive_arbitrary(rlp)] is a bit confusing as it is not clear that it generates test-cases for the type along with deriving Arbitrary.

https://github.com/paradigmxyz/reth/pull/10233 added new generate_tests! macro allowing generating tests separately.

It should now be possible to replace all #[derive_arbitrary(...)] invocations with #[cfg_attr(any(test, feature = "arbitrary"), derive(Arbitrary))] attribute + an generate_tests invocation for the type

klkvr avatar Aug 09 '24 14:08 klkvr