Skip to content

Commit bc6bdcf

Browse files
committed
Merge rust-bitcoin/rust-bitcoin#5273: Add exception for resize_if_needed mutant
b7aa867 Add exception for resize_if_needed mutant (Jamil Lambert, PhD) Pull request description: Mutation testing changes a `*=` to `+=` in the function that increases the buffer size when needed. The difference is purely performant and testing it adds no value. Exclude the mutant. Closes #5267 ACKs for top commit: apoelstra: ACK b7aa867; successfully ran local tests tcharding: ACK b7aa867 Tree-SHA512: 4f88157bbe52b7a1a05d8947290bfd493be7a48b93cadc8b5bbff701a0358157a525b0248ab18655d45c0adde8ddab47a3058ddd8f6d8bb49657bb8758e38160
2 parents 991dfdf + b7aa867 commit bc6bdcf

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

.cargo/mutants.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ exclude_re = [
4949
"primitives/.* <impl Encoder for .*Encoder<'_>>::current_chunk", # Replacing the return with Some(vec![]) causes an infinite loop.
5050
"primitives/.* <impl Encoder for .*Encoder<'_>>::advance", # Replacing the return with true causes an infinite loop.
5151
"primitives/.* <impl Decoder for WitnessDecoder>::push_bytes", # Replacing == with != causes an infinite loop
52+
"primitives/.* WitnessDecoder::resize_if_needed", # Replacing *= with += still resizes the buffer making the mutant untestable.
5253

5354
# consensus_encoding - most of these are for mutations in the logic used to determine when to stop encoding or decoding.
5455
"consensus_encoding/.* <impl Decoder for ArrayDecoder<N>>::push_bytes", # Mutations cause an infinite loop

0 commit comments

Comments
 (0)