Enhanced FromUserHex
coverage by:
- Added
std::optional
support toBOOST_CHECK_EQUAL
, allowing direct comparisons ofstd::optional<T>
with otherT
expected values. - Increased fuzz testing for hex parsing to validate against other hex validators and parsers.
- Use BOOST_CHECK_EQUAL for #30569 (review) arith_uint256, uint256, uint160
Example error before:
unknown location:0: fatal error: in “validation_chainstatemanager_tests/chainstatemanager_args”: std::bad_optional_access: bad_optional_access test/validation_chainstatemanager_tests.cpp:781: last checkpoint
after:
test/validation_chainstatemanager_tests.cpp:801: error: in “validation_chainstatemanager_tests/chainstatemanager_args”: check set_opts({"-assumevalid=0"}).assumed_valid_block == uint256::ZERO has failed [std::nullopt != 0000000000000000000000000000000000000000000000000000000000000000]