Commit Graph

11 Commits

Author SHA1 Message Date
Andrew Poelstra ca5d136667
Merge rust-bitcoin/rust-bitcoin#4666: Kill new mutants
f0562504b7 Exclude deprecated fn from mutation testing (Jamil Lambert, PhD)
4d31b141a8 Improve is_too_precise test (Jamil Lambert, PhD)
a2bae3bb0b Add test for impl Display for Script (Jamil Lambert, PhD)

Pull request description:

  Weekly mutation testing found new mutants. There are also some untested mutants in match statements that will be included in future mutation testing once #4654 goes in.
  
  - Add a regression test for the mutants in the `Display` impl for `Script`.
  - Improve the existing test for `is_too_precise` to check all four cases.
  - Exclude the two deprecated functions that have untested mutants.
  
  Closes #4646


ACKs for top commit:
  benalleng:
    **tACK** no missed mutants on f056250 I ran with 63b61e9497 rebased in to make sure the match arm and match guard mutations were included
  tcharding:
    ACK f0562504b7


Tree-SHA512: d109e30be91da2ab243a152b9ef17147337328282ac418fa9d2eebd17c2e2d9b6f7ee095d91ccf58e287c9620cb71a090b0d929c9bf35011feb26e6f28457dd3
2025-07-04 16:25:55 +00:00
Jamil Lambert, PhD f0562504b7
Exclude deprecated fn from mutation testing
Mutation testing generates mutants for deprecated functions
`MedianTimePast::to_consensus_u32` and `Height::to_consensus_u32`.

Add the functions to the  mutation testing exclude list.
2025-07-02 13:34:29 +01:00
user 63b61e9497
Remove delete match arm and match guard mutation exclusion
As of the most recent cargo mutants version v25.2.0 delete match arm
and replace match guard mutations can now be identified on function
name patterns and as a result can be effectively excluded using the
existing mutation exclusion patterns.
2025-07-01 16:42:05 -04:00
Jamil Lambert, PhD b538a10956
Add deprecated functions to mutants exclude list
New mutants found in deprecated functions in the weekly mutation
testing.

Add the deprecated functions to the exclude list so they are not
mutated.
2025-05-20 16:07:03 +01:00
Jamil Lambert, PhD 055ab7e684
Remove impl Display from mutants exclusion list
The output of Display should not change in stable crates for types that
have well defined formatting and ones that implement FromStr.
Crates that are included in the mutation testing have been updated to
test all relevant Display implementations.

Remove the exclusion so that the Display implementations are included in
mutation testing.
2025-04-30 17:26:40 +01:00
Jamil Lambert, PhD 3bcb5b0f8d
Add exclusions for match arm/guard mutants
cargo-mutants 25.0.1  introduced a new mutation pattern that deletes an
arm of a match statement or replaces a match guard with true and false.
These are applied in sections that have been excluded from mutation
testing and cause false positives.
The match patterns are also now stricter causing previously excluded
`impl` to be included.

Exclude the new match arm and guard mutation patterns.

Add `impl fmt::` versions for Debug and Display.
2025-04-29 11:23:02 +01:00
Jamil Lambert, PhD f15e461baf
Add an exclusion for a mutant in a deprecated fn
Weekly mutation testing found a mutant in a deprecated function in
SignedAmount.

Exclude the function from mutation testing.
2025-03-26 09:50:50 +00:00
Jamil Lambert, PhD 44df39e72c
Skip deprecated functions in mutants.toml
Cargo mutants found mutants in `fee_vb` and `fee_wu`.

Both functions are deprecated.  Skip them in mutant testing.
2025-02-13 18:03:56 +00:00
Jamil Lambert, PhD 3c12d4eb1f
Add primitives to mutants.toml
Add exceptions for `primitives` to `mutants.toml`.

Add `primitives` to the list of paths to run cargo mutants on.
2025-02-11 18:32:37 +00:00
Jamil Lambert, PhD 32b05132b5
Reorganize mutants.toml
Generalize `deserialize` as an exception for everywhere.

Reword comment to make clearer
2025-02-11 18:23:47 +00:00
Shing Him Ng 462c7a1130 Add weekly cargo-mutants workflow 2025-01-21 17:01:27 -06:00