Attribute Macro reth_codecs_derive::add_arbitrary_tests

source ยท
#[add_arbitrary_tests]
Expand description

Generates tests for given type.

If compact or rlp is passed to add_arbitrary_tests, there will be proptest roundtrip tests generated. An integer value passed will limit the number of proptest cases generated (default: 256).

Examples:

  • #[add_arbitrary_tests]: will derive arbitrary with no tests.
  • #[add_arbitrary_tests(rlp)]: will derive arbitrary and generate rlp roundtrip proptests.
  • #[add_arbitrary_tests(rlp, 10)]: will derive arbitrary and generate rlp roundtrip proptests. Limited to 10 cases.
  • #[add_arbitrary_tests(compact, rlp)]. will derive arbitrary and generate rlp and compact roundtrip proptests.