rust-bitcoin-unsafe-fast/bitcoin/tests/data/serde
Tobin Harding 962abcc963 Add serde regression tests
In order that we can safely change/maintain de/serialization code we
need to have regression tests with hard coded serializations for each
type that implements serde.

It is enough to test a single serde data format, use JSON for `opcodes`
and bincode for other types.

Do regression testing in a newly added `tests` module.
2022-10-29 10:47:16 +11:00
..
README.md Add serde regression tests 2022-10-29 10:47:16 +11:00
absolute_lock_time_blocks_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
absolute_lock_time_seconds_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
address_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
block_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
child_number_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
control_block_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
control_block_hex Add serde regression tests 2022-10-29 10:47:16 +11:00
ecdsa_sig_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
ecdsa_sig_hex Add serde regression tests 2022-10-29 10:47:16 +11:00
extended_priv_key Add serde regression tests 2022-10-29 10:47:16 +11:00
extended_priv_key_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
extended_pub_key Add serde regression tests 2022-10-29 10:47:16 +11:00
extended_pub_key_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
private_key_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
proprietary_key_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
psbt_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
public_key_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
public_key_hex Add serde regression tests 2022-10-29 10:47:16 +11:00
raw_pair_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
relative_lock_time_blocks_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
relative_lock_time_seconds_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
schnorr_sig_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
schnorr_sig_hex Add serde regression tests 2022-10-29 10:47:16 +11:00
script_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
taproot_builder_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
taproot_spend_info_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
transaction_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
transaction_ser Add serde regression tests 2022-10-29 10:47:16 +11:00
txin_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
txin_ser Add serde regression tests 2022-10-29 10:47:16 +11:00
txout_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
u256_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
uint128_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
uint256_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00
witness_bincode Add serde regression tests 2022-10-29 10:47:16 +11:00

README.md

Serialization input/output

Files here contain hex strings and binary data representing types used for regression testing.

  • *_hex: consensus encoded types represented as hex strings
  • *_ser: consensus encoded types represented as binary data
  • *_bincode: types serialized with serde as bincode

We consensus deserialize, serde serialize, then check against the expected data to verify no serde regressions have been introduced.