rust-bitcoin-unsafe-fast/bitcoin
Andrew Poelstra 615759a8c2
Merge rust-bitcoin/rust-bitcoin#1495: Introduce mutation testing
8ce928b8e7 Add testing section to readme (Tobin C. Harding)
2e79a0bdc4 Introduce mutation testing (Tobin C. Harding)

Pull request description:

  Introduce mutation testing by way of mutagen [0] (see #1484 for context).

  - Conditionally add the dev-dependency `mutagen` (using `do_mutate` flag)

      This flag is not very well named but `mutagen` and `mutate` are already taken?

  - Mutate all methods of the `U256` struct that do not require additional unit tests.

      Uses `cfg(all(test, do_mutate), mutate)` - I cannot workout why we need to check on `test` as well i.e., I don't understand why we cannot use `cfg(do_mutate, mutate)`?

  With this applied test can be run as usual with a stable toolchain. To run mutagen we use `RUSTFLAGS='--cfg=do_mutate' cargo +nightly mutagen` (doing so runs 29 mutants).

  [0] https://github.com/llogiq/mutagen

ACKs for top commit:
  Kixunil:
    ACK 8ce928b8e7
  apoelstra:
    ACK 8ce928b8e7

Tree-SHA512: 024ba5d2dc983f7cd0444e09ba13280771157204999d2a44502e07a1d6436f571b75003c7cb543c943f17949b848d4070eda4e194bda774a3e41443ff79af0af
2022-12-24 06:02:48 +00:00
..
contrib Fail CI if docs build throws warnings 2022-11-21 10:35:49 +11:00
embedded Patch hashes and update the code 2022-12-18 14:33:55 +01:00
examples Add `tapscript_leaf_hash()` to `Script` 2022-12-19 08:35:35 +01:00
fuzz Patch hashes and update the code 2022-12-18 14:33:55 +01:00
src Merge rust-bitcoin/rust-bitcoin#1495: Introduce mutation testing 2022-12-24 06:02:48 +00:00
tests Implemented unsized `Script` 2022-12-14 23:21:27 +01:00
CHANGELOG.md add some documentation clarifying the locktime ordering shenanigans in #1330 2022-12-15 23:12:03 +00:00
Cargo.toml Merge rust-bitcoin/rust-bitcoin#1495: Introduce mutation testing 2022-12-24 06:02:48 +00:00
build.rs Implement consensus encoding adapter for serde 2022-12-02 10:48:05 +01:00