Skip to content

Commit

Permalink
Add primitives to mutants.toml
Browse files Browse the repository at this point in the history
Add exceptions for `primitives` to `mutants.toml`.

Add `primitives` to the list of paths to run cargo mutants on.
  • Loading branch information
jamillambert committed Feb 11, 2025
1 parent 32b0513 commit 3c12d4e
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .cargo/mutants.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
additional_cargo_args = ["--all-features"]
examine_globs = ["units/src/**/*.rs"]
examine_globs = ["units/src/**/*.rs", "primitives/src/**/*.rs"]
exclude_globs = [
"units/src/amount/verification.rs" # kani tests
]
Expand All @@ -9,6 +9,7 @@ exclude_re = [
"impl Display",
".*Error",
"deserialize", # Skip serde mutation tests
"Iterator", # Mutating operations in an iterator can result in an infinite loop

# ----------------------------------Crate-specific exclusions----------------------------------
# Units
Expand All @@ -18,4 +19,14 @@ exclude_re = [
"dec_width", # Replacing num /= 10 with num %=10 in a loop causes a timeout due to infinite loop
# src/locktime/relative.rs
"Time::to_consensus_u32", # Mutant from replacing | with ^, this returns the same value since the XOR is taken against the u16 with an all-zero bitmask

# primitives
"Sequence::from_512_second_intervals", # Mutant from replacing | with ^, this returns the same value since the XOR is taken against the u16 with an all-zero bitmask
"Opcode::classify", # Not possible to kill all mutants without individually checking every opcode classification
"Block<Checked>::cached_witness_root", # Skip getters
"Block<Checked>::transactions", # Skip getters
"Script::to_bytes", # Deprecated
"decode_cursor", # Mutating operations in decode_cursor can result in an infinite loop
"fmt_debug", # Mutants from formatting/display changes
"fmt_debug_pretty", # Mutants from formatting/display changes
]

0 comments on commit 3c12d4e

Please sign in to comment.