test: run mutants under both feature configurations
test-mutants now runs cargo-mutants twice — once with defaults (defmt derives present) and once with --no-default-features (derives absent) — so feature-gated paths are covered in both shapes. Same three equivalent mutants are excluded in both runs.
This commit is contained in:
1 file changed
+11
-1
@@ -67,15 +67,25 @@ test-miri:
|
|||||||
|
|
||||||
# mutation testing (requires cargo-mutants).
|
# mutation testing (requires cargo-mutants).
|
||||||
#
|
#
|
||||||
|
# Runs under both feature configurations so that feature-gated paths
|
||||||
|
# (currently only the defmt::Format derives) are covered in both shapes.
|
||||||
# Three mutants are excluded as provably equivalent — swapping the
|
# Three mutants are excluded as provably equivalent — swapping the
|
||||||
# operator does not change behaviour because a downstream check catches
|
# operator does not change behaviour because a downstream check catches
|
||||||
# the resulting case. See the regex strings for the specific sites.
|
# the resulting case. See the regex strings for the specific sites.
|
||||||
test-mutants:
|
test-mutants: test-mutants-default test-mutants-no-default
|
||||||
|
|
||||||
|
test-mutants-default:
|
||||||
cargo mutants --no-shuffle --test-tool=nextest \
|
cargo mutants --no-shuffle --test-tool=nextest \
|
||||||
-E 'replace > with >= in Command::from_bytes' \
|
-E 'replace > with >= in Command::from_bytes' \
|
||||||
-E 'replace > with >= in CobsDecoder::feed' \
|
-E 'replace > with >= in CobsDecoder::feed' \
|
||||||
-E 'replace < with <= in cobs_encode_response'
|
-E 'replace < with <= in cobs_encode_response'
|
||||||
|
|
||||||
|
test-mutants-no-default:
|
||||||
|
cargo mutants --no-shuffle --test-tool=nextest --no-default-features \
|
||||||
|
-E 'replace > with >= in Command::from_bytes' \
|
||||||
|
-E 'replace > with >= in CobsDecoder::feed' \
|
||||||
|
-E 'replace < with <= in cobs_encode_response'
|
||||||
|
|
||||||
# format code
|
# format code
|
||||||
fmt:
|
fmt:
|
||||||
cargo fmt
|
cargo fmt
|
||||||
|
|||||||
Reference in new issue
Block a user